<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>LCOV - code analysis - /usr/include/c++/5/bits/stl_tree.h</title>
  <link rel="stylesheet" type="text/css" href="../../../../../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LCOV - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
          <tr>
            <td width="10%" class="headerItem">Current view:</td>
            <td width="35%" class="headerValue"><a href="../../../../../index.html">top level</a> - <a href="index.html">usr/include/c++/5/bits</a> - stl_tree.h<span style="font-size: 80%;"> (source / <a href="stl_tree.h.func-sort-c.html">functions</a>)</span></td>
            <td width="5%"></td>
            <td width="15%"></td>
            <td width="10%" class="headerCovTableHead">Hit</td>
            <td width="10%" class="headerCovTableHead">Total</td>
            <td width="15%" class="headerCovTableHead">Coverage</td>
          </tr>
          <tr>
            <td class="headerItem">Test:</td>
            <td class="headerValue">code analysis</td>
            <td></td>
            <td class="headerItem">Lines:</td>
            <td class="headerCovTableEntry">96</td>
            <td class="headerCovTableEntry">172</td>
            <td class="headerCovTableEntryLo">55.8 %</td>
          </tr>
          <tr>
            <td class="headerItem">Date:</td>
            <td class="headerValue">2020-09-11 22:25:26</td>
            <td></td>
            <td class="headerItem">Functions:</td>
            <td class="headerCovTableEntry">86</td>
            <td class="headerCovTableEntry">384</td>
            <td class="headerCovTableEntryLo">22.4 %</td>
          </tr>
          <tr>
            <td class="headerItem">Legend:</td>
            <td class="headerValueLeg">            Lines:
            <span class="coverLegendCov">hit</span>
            <span class="coverLegendNoCov">not hit</span>
</td>
            <td></td>
          </tr>
          <tr><td><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>
        </table>
      </td>
    </tr>

    <tr><td class="ruler"><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td>
<pre class="sourceHeading">          Line data    Source code</pre>
<pre class="source">
<a name="1"><span class="lineNum">       1 </span>            : // RB tree implementation -*- C++ -*-</a>
<span class="lineNum">       2 </span>            : 
<span class="lineNum">       3 </span>            : // Copyright (C) 2001-2015 Free Software Foundation, Inc.
<span class="lineNum">       4 </span>            : //
<span class="lineNum">       5 </span>            : // This file is part of the GNU ISO C++ Library.  This library is free
<span class="lineNum">       6 </span>            : // software; you can redistribute it and/or modify it under the
<span class="lineNum">       7 </span>            : // terms of the GNU General Public License as published by the
<span class="lineNum">       8 </span>            : // Free Software Foundation; either version 3, or (at your option)
<span class="lineNum">       9 </span>            : // any later version.
<span class="lineNum">      10 </span>            : 
<span class="lineNum">      11 </span>            : // This library is distributed in the hope that it will be useful,
<span class="lineNum">      12 </span>            : // but WITHOUT ANY WARRANTY; without even the implied warranty of
<span class="lineNum">      13 </span>            : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
<span class="lineNum">      14 </span>            : // GNU General Public License for more details.
<span class="lineNum">      15 </span>            : 
<span class="lineNum">      16 </span>            : // Under Section 7 of GPL version 3, you are granted additional
<span class="lineNum">      17 </span>            : // permissions described in the GCC Runtime Library Exception, version
<span class="lineNum">      18 </span>            : // 3.1, as published by the Free Software Foundation.
<span class="lineNum">      19 </span>            : 
<span class="lineNum">      20 </span>            : // You should have received a copy of the GNU General Public License and
<span class="lineNum">      21 </span>            : // a copy of the GCC Runtime Library Exception along with this program;
<span class="lineNum">      22 </span>            : // see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
<span class="lineNum">      23 </span>            : // &lt;http://www.gnu.org/licenses/&gt;.
<span class="lineNum">      24 </span>            : 
<span class="lineNum">      25 </span>            : /*
<span class="lineNum">      26 </span>            :  *
<span class="lineNum">      27 </span>            :  * Copyright (c) 1996,1997
<span class="lineNum">      28 </span>            :  * Silicon Graphics Computer Systems, Inc.
<span class="lineNum">      29 </span>            :  *
<span class="lineNum">      30 </span>            :  * Permission to use, copy, modify, distribute and sell this software
<span class="lineNum">      31 </span>            :  * and its documentation for any purpose is hereby granted without fee,
<span class="lineNum">      32 </span>            :  * provided that the above copyright notice appear in all copies and
<span class="lineNum">      33 </span>            :  * that both that copyright notice and this permission notice appear
<span class="lineNum">      34 </span>            :  * in supporting documentation.  Silicon Graphics makes no
<span class="lineNum">      35 </span>            :  * representations about the suitability of this software for any
<span class="lineNum">      36 </span>            :  * purpose.  It is provided &quot;as is&quot; without express or implied warranty.
<span class="lineNum">      37 </span>            :  *
<span class="lineNum">      38 </span>            :  *
<span class="lineNum">      39 </span>            :  * Copyright (c) 1994
<span class="lineNum">      40 </span>            :  * Hewlett-Packard Company
<span class="lineNum">      41 </span>            :  *
<span class="lineNum">      42 </span>            :  * Permission to use, copy, modify, distribute and sell this software
<span class="lineNum">      43 </span>            :  * and its documentation for any purpose is hereby granted without fee,
<span class="lineNum">      44 </span>            :  * provided that the above copyright notice appear in all copies and
<span class="lineNum">      45 </span>            :  * that both that copyright notice and this permission notice appear
<span class="lineNum">      46 </span>            :  * in supporting documentation.  Hewlett-Packard Company makes no
<span class="lineNum">      47 </span>            :  * representations about the suitability of this software for any
<span class="lineNum">      48 </span>            :  * purpose.  It is provided &quot;as is&quot; without express or implied warranty.
<span class="lineNum">      49 </span>            :  *
<span class="lineNum">      50 </span>            :  *
<span class="lineNum">      51 </span>            :  */
<span class="lineNum">      52 </span>            : 
<span class="lineNum">      53 </span>            : /** @file bits/stl_tree.h
<span class="lineNum">      54 </span>            :  *  This is an internal header file, included by other library headers.
<span class="lineNum">      55 </span>            :  *  Do not attempt to use it directly. @headername{map,set}
<span class="lineNum">      56 </span>            :  */
<span class="lineNum">      57 </span>            : 
<span class="lineNum">      58 </span>            : #ifndef _STL_TREE_H
<span class="lineNum">      59 </span>            : #define _STL_TREE_H 1
<span class="lineNum">      60 </span>            : 
<span class="lineNum">      61 </span>            : #pragma GCC system_header
<span class="lineNum">      62 </span>            : 
<span class="lineNum">      63 </span>            : #include &lt;bits/stl_algobase.h&gt;
<span class="lineNum">      64 </span>            : #include &lt;bits/allocator.h&gt;
<span class="lineNum">      65 </span>            : #include &lt;bits/stl_function.h&gt;
<span class="lineNum">      66 </span>            : #include &lt;bits/cpp_type_traits.h&gt;
<span class="lineNum">      67 </span>            : #include &lt;ext/alloc_traits.h&gt;
<span class="lineNum">      68 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">      69 </span>            : #include &lt;ext/aligned_buffer.h&gt;
<span class="lineNum">      70 </span>            : #endif
<span class="lineNum">      71 </span>            : 
<span class="lineNum">      72 </span>            : namespace std _GLIBCXX_VISIBILITY(default)
<span class="lineNum">      73 </span>            : {
<span class="lineNum">      74 </span>            : _GLIBCXX_BEGIN_NAMESPACE_VERSION
<span class="lineNum">      75 </span>            : 
<span class="lineNum">      76 </span>            :   // Red-black tree class, designed for use in implementing STL
<span class="lineNum">      77 </span>            :   // associative containers (set, multiset, map, and multimap). The
<span class="lineNum">      78 </span>            :   // insertion and deletion algorithms are based on those in Cormen,
<span class="lineNum">      79 </span>            :   // Leiserson, and Rivest, Introduction to Algorithms (MIT Press,
<span class="lineNum">      80 </span>            :   // 1990), except that
<span class="lineNum">      81 </span>            :   //
<span class="lineNum">      82 </span>            :   // (1) the header cell is maintained with links not only to the root
<span class="lineNum">      83 </span>            :   // but also to the leftmost node of the tree, to enable constant
<span class="lineNum">      84 </span>            :   // time begin(), and to the rightmost node of the tree, to enable
<span class="lineNum">      85 </span>            :   // linear time performance when used with the generic set algorithms
<span class="lineNum">      86 </span>            :   // (set_union, etc.)
<span class="lineNum">      87 </span>            :   // 
<span class="lineNum">      88 </span>            :   // (2) when a node being deleted has two children its successor node
<span class="lineNum">      89 </span>            :   // is relinked into its place, rather than copied, so that the only
<span class="lineNum">      90 </span>            :   // iterators invalidated are those referring to the deleted node.
<span class="lineNum">      91 </span>            : 
<span class="lineNum">      92 </span>            :   enum _Rb_tree_color { _S_red = false, _S_black = true };
<span class="lineNum">      93 </span>            : 
<span class="lineNum">      94 </span>            :   struct _Rb_tree_node_base
<span class="lineNum">      95 </span>            :   {
<span class="lineNum">      96 </span>            :     typedef _Rb_tree_node_base* _Base_ptr;
<span class="lineNum">      97 </span>            :     typedef const _Rb_tree_node_base* _Const_Base_ptr;
<span class="lineNum">      98 </span>            : 
<span class="lineNum">      99 </span>            :     _Rb_tree_color      _M_color;
<span class="lineNum">     100 </span>            :     _Base_ptr           _M_parent;
<span class="lineNum">     101 </span>            :     _Base_ptr           _M_left;
<span class="lineNum">     102 </span>            :     _Base_ptr           _M_right;
<span class="lineNum">     103 </span>            : 
<span class="lineNum">     104 </span>            :     static _Base_ptr
<span class="lineNum">     105 </span>            :     _S_minimum(_Base_ptr __x) _GLIBCXX_NOEXCEPT
<span class="lineNum">     106 </span>            :     {
<span class="lineNum">     107 </span><span class="lineNoCov">          0 :       while (__x-&gt;_M_left != 0) __x = __x-&gt;_M_left;</span>
<span class="lineNum">     108 </span>            :       return __x;
<span class="lineNum">     109 </span>            :     }
<span class="lineNum">     110 </span>            : 
<span class="lineNum">     111 </span>            :     static _Const_Base_ptr
<span class="lineNum">     112 </span>            :     _S_minimum(_Const_Base_ptr __x) _GLIBCXX_NOEXCEPT
<span class="lineNum">     113 </span>            :     {
<span class="lineNum">     114 </span>            :       while (__x-&gt;_M_left != 0) __x = __x-&gt;_M_left;
<span class="lineNum">     115 </span>            :       return __x;
<span class="lineNum">     116 </span>            :     }
<span class="lineNum">     117 </span>            : 
<span class="lineNum">     118 </span>            :     static _Base_ptr
<span class="lineNum">     119 </span>            :     _S_maximum(_Base_ptr __x) _GLIBCXX_NOEXCEPT
<span class="lineNum">     120 </span>            :     {
<span class="lineNum">     121 </span><span class="lineNoCov">          0 :       while (__x-&gt;_M_right != 0) __x = __x-&gt;_M_right;</span>
<span class="lineNum">     122 </span>            :       return __x;
<span class="lineNum">     123 </span>            :     }
<span class="lineNum">     124 </span>            : 
<span class="lineNum">     125 </span>            :     static _Const_Base_ptr
<span class="lineNum">     126 </span>            :     _S_maximum(_Const_Base_ptr __x) _GLIBCXX_NOEXCEPT
<span class="lineNum">     127 </span>            :     {
<span class="lineNum">     128 </span>            :       while (__x-&gt;_M_right != 0) __x = __x-&gt;_M_right;
<span class="lineNum">     129 </span>            :       return __x;
<span class="lineNum">     130 </span>            :     }
<span class="lineNum">     131 </span>            :   };
<span class="lineNum">     132 </span>            : 
<span class="lineNum">     133 </span>            :   template&lt;typename _Val&gt;
<span class="lineNum">     134 </span>            :     struct _Rb_tree_node : public _Rb_tree_node_base
<span class="lineNum">     135 </span>            :     {
<span class="lineNum">     136 </span>            :       typedef _Rb_tree_node&lt;_Val&gt;* _Link_type;
<span class="lineNum">     137 </span>            : 
<span class="lineNum">     138 </span>            : #if __cplusplus &lt; 201103L
<span class="lineNum">     139 </span>            :       _Val _M_value_field;
<span class="lineNum">     140 </span>            : 
<span class="lineNum">     141 </span>            :       _Val*
<span class="lineNum">     142 </span>            :       _M_valptr()
<span class="lineNum">     143 </span><span class="lineCov">        252 :       { return std::__addressof(_M_value_field); }</span>
<span class="lineNum">     144 </span>            : 
<span class="lineNum">     145 </span>            :       const _Val*
<span class="lineNum">     146 </span>            :       _M_valptr() const
<span class="lineNum">     147 </span><span class="lineCov">        257 :       { return std::__addressof(_M_value_field); }</span>
<span class="lineNum">     148 </span>            : #else
<span class="lineNum">     149 </span>            :       __gnu_cxx::__aligned_membuf&lt;_Val&gt; _M_storage;
<span class="lineNum">     150 </span>            : 
<span class="lineNum">     151 </span>            :       _Val*
<span class="lineNum">     152 </span>            :       _M_valptr()
<span class="lineNum">     153 </span>            :       { return _M_storage._M_ptr(); }
<span class="lineNum">     154 </span>            : 
<span class="lineNum">     155 </span>            :       const _Val*
<span class="lineNum">     156 </span>            :       _M_valptr() const
<span class="lineNum">     157 </span>            :       { return _M_storage._M_ptr(); }
<span class="lineNum">     158 </span>            : #endif
<span class="lineNum">     159 </span>            :     };
<span class="lineNum">     160 </span>            : 
<span class="lineNum">     161 </span>            :   _GLIBCXX_PURE _Rb_tree_node_base*
<span class="lineNum">     162 </span>            :   _Rb_tree_increment(_Rb_tree_node_base* __x) throw ();
<span class="lineNum">     163 </span>            : 
<span class="lineNum">     164 </span>            :   _GLIBCXX_PURE const _Rb_tree_node_base*
<span class="lineNum">     165 </span>            :   _Rb_tree_increment(const _Rb_tree_node_base* __x) throw ();
<span class="lineNum">     166 </span>            : 
<span class="lineNum">     167 </span>            :   _GLIBCXX_PURE _Rb_tree_node_base*
<span class="lineNum">     168 </span>            :   _Rb_tree_decrement(_Rb_tree_node_base* __x) throw ();
<span class="lineNum">     169 </span>            : 
<span class="lineNum">     170 </span>            :   _GLIBCXX_PURE const _Rb_tree_node_base*
<span class="lineNum">     171 </span>            :   _Rb_tree_decrement(const _Rb_tree_node_base* __x) throw ();
<span class="lineNum">     172 </span>            : 
<span class="lineNum">     173 </span>            :   template&lt;typename _Tp&gt;
<span class="lineNum">     174 </span>            :     struct _Rb_tree_iterator
<span class="lineNum">     175 </span>            :     {
<span class="lineNum">     176 </span>            :       typedef _Tp  value_type;
<span class="lineNum">     177 </span>            :       typedef _Tp&amp; reference;
<span class="lineNum">     178 </span>            :       typedef _Tp* pointer;
<span class="lineNum">     179 </span>            : 
<span class="lineNum">     180 </span>            :       typedef bidirectional_iterator_tag iterator_category;
<span class="lineNum">     181 </span>            :       typedef ptrdiff_t                  difference_type;
<span class="lineNum">     182 </span>            : 
<span class="lineNum">     183 </span>            :       typedef _Rb_tree_iterator&lt;_Tp&gt;        _Self;
<span class="lineNum">     184 </span>            :       typedef _Rb_tree_node_base::_Base_ptr _Base_ptr;
<span class="lineNum">     185 </span>            :       typedef _Rb_tree_node&lt;_Tp&gt;*           _Link_type;
<span class="lineNum">     186 </span>            : 
<span class="lineNum">     187 </span>            :       _Rb_tree_iterator() _GLIBCXX_NOEXCEPT
<span class="lineNum">     188 </span>            :       : _M_node() { }
<span class="lineNum">     189 </span>            : 
<span class="lineNum">     190 </span>            :       explicit
<span class="lineNum">     191 </span>            :       _Rb_tree_iterator(_Base_ptr __x) _GLIBCXX_NOEXCEPT
<span class="lineNum">     192 </span>            :       : _M_node(__x) { }
<span class="lineNum">     193 </span>            : 
<span class="lineNum">     194 </span>            :       reference
<span class="lineNum">     195 </span>            :       operator*() const _GLIBCXX_NOEXCEPT
<span class="lineNum">     196 </span>            :       { return *static_cast&lt;_Link_type&gt;(_M_node)-&gt;_M_valptr(); }
<span class="lineNum">     197 </span>            : 
<span class="lineNum">     198 </span>            :       pointer
<span class="lineNum">     199 </span>            :       operator-&gt;() const _GLIBCXX_NOEXCEPT
<span class="lineNum">     200 </span>            :       { return static_cast&lt;_Link_type&gt; (_M_node)-&gt;_M_valptr(); }
<span class="lineNum">     201 </span>            : 
<span class="lineNum">     202 </span>            :       _Self&amp;
<span class="lineNum">     203 </span>            :       operator++() _GLIBCXX_NOEXCEPT
<span class="lineNum">     204 </span>            :       {
<span class="lineNum">     205 </span><span class="lineNoCov">          0 :         _M_node = _Rb_tree_increment(_M_node);</span>
<span class="lineNum">     206 </span>            :         return *this;
<span class="lineNum">     207 </span>            :       }
<span class="lineNum">     208 </span>            : 
<span class="lineNum">     209 </span>            :       _Self
<span class="lineNum">     210 </span>            :       operator++(int) _GLIBCXX_NOEXCEPT
<span class="lineNum">     211 </span>            :       {
<span class="lineNum">     212 </span>            :         _Self __tmp = *this;
<span class="lineNum">     213 </span>            :         _M_node = _Rb_tree_increment(_M_node);
<span class="lineNum">     214 </span>            :         return __tmp;
<span class="lineNum">     215 </span>            :       }
<span class="lineNum">     216 </span>            : 
<span class="lineNum">     217 </span>            :       _Self&amp;
<span class="lineNum">     218 </span>            :       operator--() _GLIBCXX_NOEXCEPT
<span class="lineNum">     219 </span>            :       {
<span class="lineNum">     220 </span><span class="lineCov">         58 :         _M_node = _Rb_tree_decrement(_M_node);</span>
<span class="lineNum">     221 </span>            :         return *this;
<span class="lineNum">     222 </span>            :       }
<span class="lineNum">     223 </span>            : 
<span class="lineNum">     224 </span>            :       _Self
<span class="lineNum">     225 </span>            :       operator--(int) _GLIBCXX_NOEXCEPT
<span class="lineNum">     226 </span>            :       {
<span class="lineNum">     227 </span>            :         _Self __tmp = *this;
<span class="lineNum">     228 </span>            :         _M_node = _Rb_tree_decrement(_M_node);
<span class="lineNum">     229 </span>            :         return __tmp;
<span class="lineNum">     230 </span>            :       }
<span class="lineNum">     231 </span>            : 
<span class="lineNum">     232 </span>            :       bool
<span class="lineNum">     233 </span>            :       operator==(const _Self&amp; __x) const _GLIBCXX_NOEXCEPT
<span class="lineNum">     234 </span>            :       { return _M_node == __x._M_node; }
<span class="lineNum">     235 </span>            : 
<span class="lineNum">     236 </span>            :       bool
<span class="lineNum">     237 </span>            :       operator!=(const _Self&amp; __x) const _GLIBCXX_NOEXCEPT
<span class="lineNum">     238 </span>            :       { return _M_node != __x._M_node; }
<span class="lineNum">     239 </span>            : 
<span class="lineNum">     240 </span>            :       _Base_ptr _M_node;
<span class="lineNum">     241 </span>            :   };
<span class="lineNum">     242 </span>            : 
<span class="lineNum">     243 </span>            :   template&lt;typename _Tp&gt;
<span class="lineNum">     244 </span>            :     struct _Rb_tree_const_iterator
<span class="lineNum">     245 </span>            :     {
<span class="lineNum">     246 </span>            :       typedef _Tp        value_type;
<span class="lineNum">     247 </span>            :       typedef const _Tp&amp; reference;
<span class="lineNum">     248 </span>            :       typedef const _Tp* pointer;
<span class="lineNum">     249 </span>            : 
<span class="lineNum">     250 </span>            :       typedef _Rb_tree_iterator&lt;_Tp&gt; iterator;
<span class="lineNum">     251 </span>            : 
<span class="lineNum">     252 </span>            :       typedef bidirectional_iterator_tag iterator_category;
<span class="lineNum">     253 </span>            :       typedef ptrdiff_t                  difference_type;
<span class="lineNum">     254 </span>            : 
<span class="lineNum">     255 </span>            :       typedef _Rb_tree_const_iterator&lt;_Tp&gt;        _Self;
<span class="lineNum">     256 </span>            :       typedef _Rb_tree_node_base::_Const_Base_ptr _Base_ptr;
<span class="lineNum">     257 </span>            :       typedef const _Rb_tree_node&lt;_Tp&gt;*           _Link_type;
<span class="lineNum">     258 </span>            : 
<span class="lineNum">     259 </span>            :       _Rb_tree_const_iterator() _GLIBCXX_NOEXCEPT
<span class="lineNum">     260 </span>            :       : _M_node() { }
<span class="lineNum">     261 </span>            : 
<span class="lineNum">     262 </span>            :       explicit
<span class="lineNum">     263 </span>            :       _Rb_tree_const_iterator(_Base_ptr __x) _GLIBCXX_NOEXCEPT
<span class="lineNum">     264 </span>            :       : _M_node(__x) { }
<span class="lineNum">     265 </span>            : 
<span class="lineNum">     266 </span>            :       _Rb_tree_const_iterator(const iterator&amp; __it) _GLIBCXX_NOEXCEPT
<span class="lineNum">     267 </span><span class="lineCov">         55 :       : _M_node(__it._M_node) { }</span>
<span class="lineNum">     268 </span>            : 
<span class="lineNum">     269 </span>            :       iterator
<span class="lineNum">     270 </span>            :       _M_const_cast() const _GLIBCXX_NOEXCEPT
<span class="lineNum">     271 </span><span class="lineCov">        222 :       { return iterator(const_cast&lt;typename iterator::_Base_ptr&gt;(_M_node)); }</span>
<span class="lineNum">     272 </span>            : 
<span class="lineNum">     273 </span>            :       reference
<span class="lineNum">     274 </span>            :       operator*() const _GLIBCXX_NOEXCEPT
<span class="lineNum">     275 </span>            :       { return *static_cast&lt;_Link_type&gt;(_M_node)-&gt;_M_valptr(); }
<span class="lineNum">     276 </span>            : 
<span class="lineNum">     277 </span>            :       pointer
<span class="lineNum">     278 </span>            :       operator-&gt;() const _GLIBCXX_NOEXCEPT
<span class="lineNum">     279 </span>            :       { return static_cast&lt;_Link_type&gt;(_M_node)-&gt;_M_valptr(); }
<span class="lineNum">     280 </span>            : 
<span class="lineNum">     281 </span>            :       _Self&amp;
<span class="lineNum">     282 </span>            :       operator++() _GLIBCXX_NOEXCEPT
<span class="lineNum">     283 </span>            :       {
<span class="lineNum">     284 </span><span class="lineCov">          2 :         _M_node = _Rb_tree_increment(_M_node);</span>
<span class="lineNum">     285 </span>            :         return *this;
<span class="lineNum">     286 </span>            :       }
<span class="lineNum">     287 </span>            : 
<span class="lineNum">     288 </span>            :       _Self
<span class="lineNum">     289 </span>            :       operator++(int) _GLIBCXX_NOEXCEPT
<span class="lineNum">     290 </span>            :       {
<span class="lineNum">     291 </span>            :         _Self __tmp = *this;
<span class="lineNum">     292 </span><span class="lineCov">         13 :         _M_node = _Rb_tree_increment(_M_node);</span>
<span class="lineNum">     293 </span>            :         return __tmp;
<span class="lineNum">     294 </span>            :       }
<span class="lineNum">     295 </span>            : 
<span class="lineNum">     296 </span>            :       _Self&amp;
<span class="lineNum">     297 </span>            :       operator--() _GLIBCXX_NOEXCEPT
<span class="lineNum">     298 </span>            :       {
<span class="lineNum">     299 </span>            :         _M_node = _Rb_tree_decrement(_M_node);
<span class="lineNum">     300 </span>            :         return *this;
<span class="lineNum">     301 </span>            :       }
<span class="lineNum">     302 </span>            : 
<span class="lineNum">     303 </span>            :       _Self
<span class="lineNum">     304 </span>            :       operator--(int) _GLIBCXX_NOEXCEPT
<span class="lineNum">     305 </span>            :       {
<span class="lineNum">     306 </span>            :         _Self __tmp = *this;
<span class="lineNum">     307 </span>            :         _M_node = _Rb_tree_decrement(_M_node);
<span class="lineNum">     308 </span>            :         return __tmp;
<span class="lineNum">     309 </span>            :       }
<span class="lineNum">     310 </span>            : 
<span class="lineNum">     311 </span>            :       bool
<span class="lineNum">     312 </span>            :       operator==(const _Self&amp; __x) const _GLIBCXX_NOEXCEPT
<span class="lineNum">     313 </span><span class="lineCov">        146 :       { return _M_node == __x._M_node; }</span>
<span class="lineNum">     314 </span>            : 
<span class="lineNum">     315 </span>            :       bool
<span class="lineNum">     316 </span>            :       operator!=(const _Self&amp; __x) const _GLIBCXX_NOEXCEPT
<span class="lineNum">     317 </span><span class="lineNoCov">          0 :       { return _M_node != __x._M_node; }</span>
<span class="lineNum">     318 </span>            : 
<span class="lineNum">     319 </span>            :       _Base_ptr _M_node;
<span class="lineNum">     320 </span>            :     };
<span class="lineNum">     321 </span>            : 
<span class="lineNum">     322 </span>            :   template&lt;typename _Val&gt;
<span class="lineNum">     323 </span>            :     inline bool
<span class="lineNum">     324 </span>            :     operator==(const _Rb_tree_iterator&lt;_Val&gt;&amp; __x,
<span class="lineNum">     325 </span>            :                const _Rb_tree_const_iterator&lt;_Val&gt;&amp; __y) _GLIBCXX_NOEXCEPT
<span class="lineNum">     326 </span>            :     { return __x._M_node == __y._M_node; }
<span class="lineNum">     327 </span>            : 
<span class="lineNum">     328 </span>            :   template&lt;typename _Val&gt;
<span class="lineNum">     329 </span>            :     inline bool
<span class="lineNum">     330 </span>            :     operator!=(const _Rb_tree_iterator&lt;_Val&gt;&amp; __x,
<span class="lineNum">     331 </span>            :                const _Rb_tree_const_iterator&lt;_Val&gt;&amp; __y) _GLIBCXX_NOEXCEPT
<span class="lineNum">     332 </span>            :     { return __x._M_node != __y._M_node; }
<span class="lineNum">     333 </span>            : 
<span class="lineNum">     334 </span>            :   void
<span class="lineNum">     335 </span>            :   _Rb_tree_insert_and_rebalance(const bool __insert_left,
<span class="lineNum">     336 </span>            :                                 _Rb_tree_node_base* __x,
<span class="lineNum">     337 </span>            :                                 _Rb_tree_node_base* __p,
<span class="lineNum">     338 </span>            :                                 _Rb_tree_node_base&amp; __header) throw ();
<span class="lineNum">     339 </span>            : 
<span class="lineNum">     340 </span>            :   _Rb_tree_node_base*
<span class="lineNum">     341 </span>            :   _Rb_tree_rebalance_for_erase(_Rb_tree_node_base* const __z,
<span class="lineNum">     342 </span>            :                                _Rb_tree_node_base&amp; __header) throw ();
<span class="lineNum">     343 </span>            : 
<span class="lineNum">     344 </span>            : 
<span class="lineNum">     345 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">     346 </span>            :            typename _Compare, typename _Alloc = allocator&lt;_Val&gt; &gt;
<span class="lineNum">     347 </span>            :     class _Rb_tree
<span class="lineNum">     348 </span>            :     {
<span class="lineNum">     349 </span>            :       typedef typename __gnu_cxx::__alloc_traits&lt;_Alloc&gt;::template
<span class="lineNum">     350 </span>            :         rebind&lt;_Rb_tree_node&lt;_Val&gt; &gt;::other _Node_allocator;
<span class="lineNum">     351 </span>            : 
<span class="lineNum">     352 </span>            :       typedef __gnu_cxx::__alloc_traits&lt;_Node_allocator&gt; _Alloc_traits;
<span class="lineNum">     353 </span>            : 
<span class="lineNum">     354 </span>            :     protected:
<span class="lineNum">     355 </span>            :       typedef _Rb_tree_node_base*               _Base_ptr;
<span class="lineNum">     356 </span>            :       typedef const _Rb_tree_node_base*         _Const_Base_ptr;
<span class="lineNum">     357 </span>            :       typedef _Rb_tree_node&lt;_Val&gt;*                _Link_type;
<span class="lineNum">     358 </span>            :       typedef const _Rb_tree_node&lt;_Val&gt;*  _Const_Link_type;
<span class="lineNum">     359 </span>            : 
<span class="lineNum">     360 </span>            :     private:
<span class="lineNum">     361 </span>            :       // Functor recycling a pool of nodes and using allocation once the pool
<span class="lineNum">     362 </span>            :       // is empty.
<span class="lineNum">     363 </span>            :       struct _Reuse_or_alloc_node
<span class="lineNum">     364 </span>            :       {
<span class="lineNum">     365 </span>            :         _Reuse_or_alloc_node(_Rb_tree&amp; __t)
<span class="lineNum">     366 </span><span class="lineNoCov">          0 :           : _M_root(__t._M_root()), _M_nodes(__t._M_rightmost()), _M_t(__t)</span>
<span class="lineNum">     367 </span>            :         {
<span class="lineNum">     368 </span><span class="lineNoCov">          0 :           if (_M_root)</span>
<span class="lineNum">     369 </span>            :             {
<span class="lineNum">     370 </span><span class="lineNoCov">          0 :               _M_root-&gt;_M_parent = 0;</span>
<span class="lineNum">     371 </span>            : 
<span class="lineNum">     372 </span><span class="lineNoCov">          0 :               if (_M_nodes-&gt;_M_left)</span>
<span class="lineNum">     373 </span><span class="lineNoCov">          0 :                 _M_nodes = _M_nodes-&gt;_M_left;</span>
<span class="lineNum">     374 </span>            :             }
<span class="lineNum">     375 </span>            :           else
<span class="lineNum">     376 </span><span class="lineNoCov">          0 :             _M_nodes = 0;</span>
<span class="lineNum">     377 </span>            :         }
<span class="lineNum">     378 </span>            : 
<span class="lineNum">     379 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">     380 </span>            :         _Reuse_or_alloc_node(const _Reuse_or_alloc_node&amp;) = delete;
<span class="lineNum">     381 </span>            : #endif
<span class="lineNum">     382 </span>            : 
<span class="lineNum">     383 </span>            :         ~_Reuse_or_alloc_node()
<span class="lineNum">     384 </span><span class="lineNoCov">          0 :         { _M_t._M_erase(static_cast&lt;_Link_type&gt;(_M_root)); }</span>
<span class="lineNum">     385 </span>            : 
<span class="lineNum">     386 </span>            :         template&lt;typename _Arg&gt;
<a name="387"><span class="lineNum">     387 </span>            :           _Link_type</a>
<span class="lineNum">     388 </span>            : #if __cplusplus &lt; 201103L
<span class="lineNum">     389 </span><span class="lineNoCov">          0 :           operator()(const _Arg&amp; __arg)</span>
<span class="lineNum">     390 </span>            : #else
<span class="lineNum">     391 </span>            :           operator()(_Arg&amp;&amp; __arg)
<span class="lineNum">     392 </span>            : #endif
<span class="lineNum">     393 </span>            :           {
<span class="lineNum">     394 </span><span class="lineNoCov">          0 :             _Link_type __node = static_cast&lt;_Link_type&gt;(_M_extract());</span>
<span class="lineNum">     395 </span><span class="lineNoCov">          0 :             if (__node)</span>
<span class="lineNum">     396 </span>            :               {
<span class="lineNum">     397 </span>            :                 _M_t._M_destroy_node(__node);
<span class="lineNum">     398 </span>            :                 _M_t._M_construct_node(__node, _GLIBCXX_FORWARD(_Arg, __arg));
<span class="lineNum">     399 </span>            :                 return __node;
<span class="lineNum">     400 </span>            :               }
<span class="lineNum">     401 </span>            : 
<span class="lineNum">     402 </span><span class="lineNoCov">          0 :             return _M_t._M_create_node(_GLIBCXX_FORWARD(_Arg, __arg));</span>
<span class="lineNum">     403 </span>            :           }
<span class="lineNum">     404 </span>            : 
<a name="405"><span class="lineNum">     405 </span>            :       private:</a>
<span class="lineNum">     406 </span>            :         _Base_ptr
<span class="lineNum">     407 </span><span class="lineNoCov">          0 :         _M_extract()</span>
<span class="lineNum">     408 </span>            :         {
<span class="lineNum">     409 </span><span class="lineNoCov">          0 :           if (!_M_nodes)</span>
<span class="lineNum">     410 </span>            :             return _M_nodes;
<span class="lineNum">     411 </span>            : 
<span class="lineNum">     412 </span>            :           _Base_ptr __node = _M_nodes;
<span class="lineNum">     413 </span><span class="lineNoCov">          0 :           _M_nodes = _M_nodes-&gt;_M_parent;</span>
<span class="lineNum">     414 </span><span class="lineNoCov">          0 :           if (_M_nodes)</span>
<span class="lineNum">     415 </span>            :             {
<span class="lineNum">     416 </span><span class="lineNoCov">          0 :               if (_M_nodes-&gt;_M_right == __node)</span>
<span class="lineNum">     417 </span>            :                 {
<span class="lineNum">     418 </span><span class="lineNoCov">          0 :                   _M_nodes-&gt;_M_right = 0;</span>
<span class="lineNum">     419 </span>            : 
<span class="lineNum">     420 </span><span class="lineNoCov">          0 :                   if (_M_nodes-&gt;_M_left)</span>
<span class="lineNum">     421 </span>            :                     {
<span class="lineNum">     422 </span><span class="lineNoCov">          0 :                       _M_nodes = _M_nodes-&gt;_M_left;</span>
<span class="lineNum">     423 </span>            : 
<span class="lineNum">     424 </span><span class="lineNoCov">          0 :                       while (_M_nodes-&gt;_M_right)</span>
<span class="lineNum">     425 </span><span class="lineNoCov">          0 :                         _M_nodes = _M_nodes-&gt;_M_right;</span>
<span class="lineNum">     426 </span>            : 
<span class="lineNum">     427 </span><span class="lineNoCov">          0 :                       if (_M_nodes-&gt;_M_left)</span>
<span class="lineNum">     428 </span><span class="lineNoCov">          0 :                         _M_nodes = _M_nodes-&gt;_M_left;</span>
<span class="lineNum">     429 </span>            :                     }
<span class="lineNum">     430 </span>            :                 }
<span class="lineNum">     431 </span>            :               else // __node is on the left.
<span class="lineNum">     432 </span><span class="lineNoCov">          0 :                 _M_nodes-&gt;_M_left = 0;</span>
<span class="lineNum">     433 </span>            :             }
<span class="lineNum">     434 </span>            :           else
<span class="lineNum">     435 </span><span class="lineNoCov">          0 :             _M_root = 0;</span>
<span class="lineNum">     436 </span>            : 
<span class="lineNum">     437 </span>            :           return __node;
<span class="lineNum">     438 </span>            :         }
<span class="lineNum">     439 </span>            : 
<span class="lineNum">     440 </span>            :         _Base_ptr _M_root;
<span class="lineNum">     441 </span>            :         _Base_ptr _M_nodes;
<span class="lineNum">     442 </span>            :         _Rb_tree&amp; _M_t;
<span class="lineNum">     443 </span>            :       };
<span class="lineNum">     444 </span>            : 
<span class="lineNum">     445 </span>            :       // Functor similar to the previous one but without any pool of nodes to
<span class="lineNum">     446 </span>            :       // recycle.
<span class="lineNum">     447 </span>            :       struct _Alloc_node
<span class="lineNum">     448 </span>            :       {
<span class="lineNum">     449 </span>            :         _Alloc_node(_Rb_tree&amp; __t)
<span class="lineNum">     450 </span>            :           : _M_t(__t) { }
<span class="lineNum">     451 </span>            : 
<span class="lineNum">     452 </span>            :         template&lt;typename _Arg&gt;
<span class="lineNum">     453 </span>            :           _Link_type
<span class="lineNum">     454 </span>            : #if __cplusplus &lt; 201103L
<span class="lineNum">     455 </span>            :           operator()(const _Arg&amp; __arg) const
<span class="lineNum">     456 </span>            : #else
<span class="lineNum">     457 </span>            :           operator()(_Arg&amp;&amp; __arg) const
<span class="lineNum">     458 </span>            : #endif
<span class="lineNum">     459 </span><span class="lineNoCov">          0 :           { return _M_t._M_create_node(_GLIBCXX_FORWARD(_Arg, __arg)); }</span>
<span class="lineNum">     460 </span>            : 
<span class="lineNum">     461 </span>            :       private:
<span class="lineNum">     462 </span>            :         _Rb_tree&amp; _M_t;
<span class="lineNum">     463 </span>            :       };
<span class="lineNum">     464 </span>            : 
<span class="lineNum">     465 </span>            :     public:
<span class="lineNum">     466 </span>            :       typedef _Key                              key_type;
<span class="lineNum">     467 </span>            :       typedef _Val                              value_type;
<span class="lineNum">     468 </span>            :       typedef value_type*                       pointer;
<span class="lineNum">     469 </span>            :       typedef const value_type*                 const_pointer;
<span class="lineNum">     470 </span>            :       typedef value_type&amp;                   reference;
<span class="lineNum">     471 </span>            :       typedef const value_type&amp;             const_reference;
<span class="lineNum">     472 </span>            :       typedef size_t                            size_type;
<span class="lineNum">     473 </span>            :       typedef ptrdiff_t                         difference_type;
<span class="lineNum">     474 </span>            :       typedef _Alloc                            allocator_type;
<span class="lineNum">     475 </span>            : 
<span class="lineNum">     476 </span>            :       _Node_allocator&amp;
<span class="lineNum">     477 </span>            :       _M_get_Node_allocator() _GLIBCXX_NOEXCEPT
<span class="lineNum">     478 </span>            :       { return *static_cast&lt;_Node_allocator*&gt;(&amp;this-&gt;_M_impl); }
<span class="lineNum">     479 </span>            :       
<span class="lineNum">     480 </span>            :       const _Node_allocator&amp;
<span class="lineNum">     481 </span>            :       _M_get_Node_allocator() const _GLIBCXX_NOEXCEPT
<span class="lineNum">     482 </span>            :       { return *static_cast&lt;const _Node_allocator*&gt;(&amp;this-&gt;_M_impl); }
<span class="lineNum">     483 </span>            : 
<span class="lineNum">     484 </span>            :       allocator_type
<span class="lineNum">     485 </span>            :       get_allocator() const _GLIBCXX_NOEXCEPT
<span class="lineNum">     486 </span>            :       { return allocator_type(_M_get_Node_allocator()); }
<span class="lineNum">     487 </span>            : 
<span class="lineNum">     488 </span>            :     protected:
<span class="lineNum">     489 </span>            :       _Link_type
<span class="lineNum">     490 </span>            :       _M_get_node()
<span class="lineNum">     491 </span>            :       { return _Alloc_traits::allocate(_M_get_Node_allocator(), 1); }
<span class="lineNum">     492 </span>            : 
<span class="lineNum">     493 </span>            :       void
<span class="lineNum">     494 </span>            :       _M_put_node(_Link_type __p) _GLIBCXX_NOEXCEPT
<span class="lineNum">     495 </span>            :       { _Alloc_traits::deallocate(_M_get_Node_allocator(), __p, 1); }
<span class="lineNum">     496 </span>            : 
<a name="497"><span class="lineNum">     497 </span>            : #if __cplusplus &lt; 201103L</a>
<span class="lineNum">     498 </span>            :       void
<span class="lineNum">     499 </span><span class="lineCov">        226 :       _M_construct_node(_Link_type __node, const value_type&amp; __x)</span>
<span class="lineNum">     500 </span>            :       {
<span class="lineNum">     501 </span>            :         __try
<span class="lineNum">     502 </span>            :           { get_allocator().construct(__node-&gt;_M_valptr(), __x); }
<span class="lineNum">     503 </span><span class="lineNoCov">          0 :         __catch(...)</span>
<span class="lineNum">     504 </span>            :           {
<span class="lineNum">     505 </span>            :             _M_put_node(__node);
<span class="lineNum">     506 </span><span class="lineNoCov">          0 :             __throw_exception_again;</span>
<span class="lineNum">     507 </span>            :           }
<span class="lineNum">     508 </span><span class="lineCov">        226 :       }</span>
<a name="509"><span class="lineNum">     509 </span>            : </a>
<span class="lineNum">     510 </span>            :       _Link_type
<span class="lineNum">     511 </span><span class="lineNoCov">          0 :       _M_create_node(const value_type&amp; __x)</span>
<span class="lineNum">     512 </span>            :       {
<span class="lineNum">     513 </span>            :         _Link_type __tmp = _M_get_node();
<span class="lineNum">     514 </span><span class="lineCov">        226 :         _M_construct_node(__tmp, __x);</span>
<span class="lineNum">     515 </span><span class="lineNoCov">          0 :         return __tmp;</span>
<span class="lineNum">     516 </span>            :       }
<span class="lineNum">     517 </span>            : 
<span class="lineNum">     518 </span>            :       void
<span class="lineNum">     519 </span>            :       _M_destroy_node(_Link_type __p)
<span class="lineNum">     520 </span>            :       { get_allocator().destroy(__p-&gt;_M_valptr()); }
<span class="lineNum">     521 </span>            : #else
<span class="lineNum">     522 </span>            :       template&lt;typename... _Args&gt;
<span class="lineNum">     523 </span>            :         void
<span class="lineNum">     524 </span>            :         _M_construct_node(_Link_type __node, _Args&amp;&amp;... __args)
<span class="lineNum">     525 </span>            :         {
<span class="lineNum">     526 </span>            :           __try
<span class="lineNum">     527 </span>            :             {
<span class="lineNum">     528 </span>            :               ::new(__node) _Rb_tree_node&lt;_Val&gt;;
<span class="lineNum">     529 </span>            :               _Alloc_traits::construct(_M_get_Node_allocator(),
<span class="lineNum">     530 </span>            :                                        __node-&gt;_M_valptr(),
<span class="lineNum">     531 </span>            :                                        std::forward&lt;_Args&gt;(__args)...);
<span class="lineNum">     532 </span>            :             }
<span class="lineNum">     533 </span>            :           __catch(...)
<span class="lineNum">     534 </span>            :             {
<span class="lineNum">     535 </span>            :               __node-&gt;~_Rb_tree_node&lt;_Val&gt;();
<span class="lineNum">     536 </span>            :               _M_put_node(__node);
<span class="lineNum">     537 </span>            :               __throw_exception_again;
<span class="lineNum">     538 </span>            :             }
<span class="lineNum">     539 </span>            :         }
<span class="lineNum">     540 </span>            : 
<span class="lineNum">     541 </span>            :       template&lt;typename... _Args&gt;
<span class="lineNum">     542 </span>            :         _Link_type
<span class="lineNum">     543 </span>            :         _M_create_node(_Args&amp;&amp;... __args)
<span class="lineNum">     544 </span>            :         {
<span class="lineNum">     545 </span>            :           _Link_type __tmp = _M_get_node();
<span class="lineNum">     546 </span>            :           _M_construct_node(__tmp, std::forward&lt;_Args&gt;(__args)...);
<span class="lineNum">     547 </span>            :           return __tmp;
<span class="lineNum">     548 </span>            :         }
<span class="lineNum">     549 </span>            : 
<span class="lineNum">     550 </span>            :       void
<span class="lineNum">     551 </span>            :       _M_destroy_node(_Link_type __p) noexcept
<span class="lineNum">     552 </span>            :       {
<span class="lineNum">     553 </span>            :         _Alloc_traits::destroy(_M_get_Node_allocator(), __p-&gt;_M_valptr());
<span class="lineNum">     554 </span>            :         __p-&gt;~_Rb_tree_node&lt;_Val&gt;();
<span class="lineNum">     555 </span>            :       }
<span class="lineNum">     556 </span>            : #endif
<a name="557"><span class="lineNum">     557 </span>            : </a>
<span class="lineNum">     558 </span>            :       void
<span class="lineNum">     559 </span><span class="lineCov">         90 :       _M_drop_node(_Link_type __p) _GLIBCXX_NOEXCEPT</span>
<span class="lineNum">     560 </span>            :       {
<span class="lineNum">     561 </span>            :         _M_destroy_node(__p);
<span class="lineNum">     562 </span>            :         _M_put_node(__p);
<span class="lineNum">     563 </span><span class="lineCov">         90 :       }</span>
<span class="lineNum">     564 </span>            : 
<span class="lineNum">     565 </span>            :       template&lt;typename _NodeGen&gt;
<span class="lineNum">     566 </span>            :         _Link_type
<span class="lineNum">     567 </span>            :         _M_clone_node(_Const_Link_type __x, _NodeGen&amp; __node_gen)
<span class="lineNum">     568 </span>            :         {
<span class="lineNum">     569 </span><span class="lineNoCov">          0 :           _Link_type __tmp = __node_gen(*__x-&gt;_M_valptr());</span>
<span class="lineNum">     570 </span><span class="lineNoCov">          0 :           __tmp-&gt;_M_color = __x-&gt;_M_color;</span>
<span class="lineNum">     571 </span><span class="lineNoCov">          0 :           __tmp-&gt;_M_left = 0;</span>
<span class="lineNum">     572 </span><span class="lineNoCov">          0 :           __tmp-&gt;_M_right = 0;</span>
<span class="lineNum">     573 </span>            :           return __tmp;
<span class="lineNum">     574 </span>            :         }
<span class="lineNum">     575 </span>            : 
<span class="lineNum">     576 </span>            :     protected:
<span class="lineNum">     577 </span>            :       // Unused _Is_pod_comparator is kept as it is part of mangled name.
<span class="lineNum">     578 </span>            :       template&lt;typename _Key_compare,
<span class="lineNum">     579 </span>            :                bool /* _Is_pod_comparator */ = __is_pod(_Key_compare)&gt;
<span class="lineNum">     580 </span><span class="lineCov">         13 :         struct _Rb_tree_impl : public _Node_allocator</span>
<span class="lineNum">     581 </span>            :         {
<span class="lineNum">     582 </span>            :           _Key_compare          _M_key_compare;
<span class="lineNum">     583 </span>            :           _Rb_tree_node_base    _M_header;
<span class="lineNum">     584 </span>            :           size_type             _M_node_count; // Keeps track of size of tree.
<span class="lineNum">     585 </span>            : 
<span class="lineNum">     586 </span>            :           _Rb_tree_impl()
<span class="lineNum">     587 </span>            :           : _Node_allocator(), _M_key_compare(), _M_header(),
<span class="lineNum">     588 </span><span class="lineCov">         19 :             _M_node_count(0)</span>
<span class="lineNum">     589 </span>            :           { _M_initialize(); }
<span class="lineNum">     590 </span>            : 
<span class="lineNum">     591 </span>            :           _Rb_tree_impl(const _Key_compare&amp; __comp, const _Node_allocator&amp; __a)
<span class="lineNum">     592 </span>            :           : _Node_allocator(__a), _M_key_compare(__comp), _M_header(),
<span class="lineNum">     593 </span>            :             _M_node_count(0)
<span class="lineNum">     594 </span>            :           { _M_initialize(); }
<span class="lineNum">     595 </span>            : 
<span class="lineNum">     596 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">     597 </span>            :           _Rb_tree_impl(const _Key_compare&amp; __comp, _Node_allocator&amp;&amp; __a)
<span class="lineNum">     598 </span>            :           : _Node_allocator(std::move(__a)), _M_key_compare(__comp),
<span class="lineNum">     599 </span>            :             _M_header(), _M_node_count(0)
<span class="lineNum">     600 </span>            :           { _M_initialize(); }
<span class="lineNum">     601 </span>            : #endif
<span class="lineNum">     602 </span>            : 
<span class="lineNum">     603 </span>            :           void
<span class="lineNum">     604 </span>            :           _M_reset()
<span class="lineNum">     605 </span>            :           {
<span class="lineNum">     606 </span><span class="lineNoCov">          0 :             this-&gt;_M_header._M_parent = 0;</span>
<span class="lineNum">     607 </span><span class="lineNoCov">          0 :             this-&gt;_M_header._M_left = &amp;this-&gt;_M_header;</span>
<span class="lineNum">     608 </span><span class="lineNoCov">          0 :             this-&gt;_M_header._M_right = &amp;this-&gt;_M_header;</span>
<span class="lineNum">     609 </span><span class="lineNoCov">          0 :             this-&gt;_M_node_count = 0;</span>
<span class="lineNum">     610 </span>            :           }
<span class="lineNum">     611 </span>            : 
<span class="lineNum">     612 </span>            :         private:
<span class="lineNum">     613 </span>            :           void
<span class="lineNum">     614 </span>            :           _M_initialize()
<span class="lineNum">     615 </span>            :           {
<span class="lineNum">     616 </span>            :             this-&gt;_M_header._M_color = _S_red;
<span class="lineNum">     617 </span>            :             this-&gt;_M_header._M_parent = 0;
<span class="lineNum">     618 </span><span class="lineCov">         19 :             this-&gt;_M_header._M_left = &amp;this-&gt;_M_header;</span>
<span class="lineNum">     619 </span><span class="lineCov">         19 :             this-&gt;_M_header._M_right = &amp;this-&gt;_M_header;</span>
<span class="lineNum">     620 </span>            :           }         
<span class="lineNum">     621 </span>            :         };
<span class="lineNum">     622 </span>            : 
<span class="lineNum">     623 </span>            :       _Rb_tree_impl&lt;_Compare&gt; _M_impl;
<span class="lineNum">     624 </span>            : 
<span class="lineNum">     625 </span>            :     protected:
<span class="lineNum">     626 </span>            :       _Base_ptr&amp;
<span class="lineNum">     627 </span>            :       _M_root() _GLIBCXX_NOEXCEPT
<span class="lineNum">     628 </span>            :       { return this-&gt;_M_impl._M_header._M_parent; }
<span class="lineNum">     629 </span>            : 
<span class="lineNum">     630 </span>            :       _Const_Base_ptr
<span class="lineNum">     631 </span>            :       _M_root() const _GLIBCXX_NOEXCEPT
<span class="lineNum">     632 </span>            :       { return this-&gt;_M_impl._M_header._M_parent; }
<span class="lineNum">     633 </span>            : 
<span class="lineNum">     634 </span>            :       _Base_ptr&amp;
<span class="lineNum">     635 </span>            :       _M_leftmost() _GLIBCXX_NOEXCEPT
<span class="lineNum">     636 </span>            :       { return this-&gt;_M_impl._M_header._M_left; }
<span class="lineNum">     637 </span>            : 
<span class="lineNum">     638 </span>            :       _Const_Base_ptr
<span class="lineNum">     639 </span>            :       _M_leftmost() const _GLIBCXX_NOEXCEPT
<span class="lineNum">     640 </span>            :       { return this-&gt;_M_impl._M_header._M_left; }
<span class="lineNum">     641 </span>            : 
<span class="lineNum">     642 </span>            :       _Base_ptr&amp;
<span class="lineNum">     643 </span>            :       _M_rightmost() _GLIBCXX_NOEXCEPT
<span class="lineNum">     644 </span>            :       { return this-&gt;_M_impl._M_header._M_right; }
<span class="lineNum">     645 </span>            : 
<span class="lineNum">     646 </span>            :       _Const_Base_ptr
<span class="lineNum">     647 </span>            :       _M_rightmost() const _GLIBCXX_NOEXCEPT
<span class="lineNum">     648 </span>            :       { return this-&gt;_M_impl._M_header._M_right; }
<span class="lineNum">     649 </span>            : 
<span class="lineNum">     650 </span>            :       _Link_type
<span class="lineNum">     651 </span>            :       _M_begin() _GLIBCXX_NOEXCEPT
<span class="lineNum">     652 </span>            :       { return static_cast&lt;_Link_type&gt;(this-&gt;_M_impl._M_header._M_parent); }
<span class="lineNum">     653 </span>            : 
<span class="lineNum">     654 </span>            :       _Const_Link_type
<span class="lineNum">     655 </span>            :       _M_begin() const _GLIBCXX_NOEXCEPT
<span class="lineNum">     656 </span>            :       {
<span class="lineNum">     657 </span>            :         return static_cast&lt;_Const_Link_type&gt;
<span class="lineNum">     658 </span>            :           (this-&gt;_M_impl._M_header._M_parent);
<span class="lineNum">     659 </span>            :       }
<span class="lineNum">     660 </span>            : 
<span class="lineNum">     661 </span>            :       _Link_type
<span class="lineNum">     662 </span>            :       _M_end() _GLIBCXX_NOEXCEPT
<span class="lineNum">     663 </span><span class="lineCov">        879 :       { return reinterpret_cast&lt;_Link_type&gt;(&amp;this-&gt;_M_impl._M_header); }</span>
<span class="lineNum">     664 </span>            : 
<span class="lineNum">     665 </span>            :       _Const_Link_type
<span class="lineNum">     666 </span>            :       _M_end() const _GLIBCXX_NOEXCEPT
<span class="lineNum">     667 </span><span class="lineCov">        146 :       { return reinterpret_cast&lt;_Const_Link_type&gt;(&amp;this-&gt;_M_impl._M_header); }</span>
<span class="lineNum">     668 </span>            : 
<span class="lineNum">     669 </span>            :       static const_reference
<span class="lineNum">     670 </span>            :       _S_value(_Const_Link_type __x)
<span class="lineNum">     671 </span>            :       { return *__x-&gt;_M_valptr(); }
<span class="lineNum">     672 </span>            : 
<span class="lineNum">     673 </span>            :       static const _Key&amp;
<span class="lineNum">     674 </span>            :       _S_key(_Const_Link_type __x)
<span class="lineNum">     675 </span>            :       { return _KeyOfValue()(_S_value(__x)); }
<span class="lineNum">     676 </span>            : 
<span class="lineNum">     677 </span>            :       static _Link_type
<span class="lineNum">     678 </span>            :       _S_left(_Base_ptr __x) _GLIBCXX_NOEXCEPT
<span class="lineNum">     679 </span>            :       { return static_cast&lt;_Link_type&gt;(__x-&gt;_M_left); }
<span class="lineNum">     680 </span>            : 
<span class="lineNum">     681 </span>            :       static _Const_Link_type
<span class="lineNum">     682 </span>            :       _S_left(_Const_Base_ptr __x) _GLIBCXX_NOEXCEPT
<span class="lineNum">     683 </span>            :       { return static_cast&lt;_Const_Link_type&gt;(__x-&gt;_M_left); }
<span class="lineNum">     684 </span>            : 
<span class="lineNum">     685 </span>            :       static _Link_type
<span class="lineNum">     686 </span>            :       _S_right(_Base_ptr __x) _GLIBCXX_NOEXCEPT
<span class="lineNum">     687 </span>            :       { return static_cast&lt;_Link_type&gt;(__x-&gt;_M_right); }
<span class="lineNum">     688 </span>            : 
<span class="lineNum">     689 </span>            :       static _Const_Link_type
<span class="lineNum">     690 </span>            :       _S_right(_Const_Base_ptr __x) _GLIBCXX_NOEXCEPT
<span class="lineNum">     691 </span>            :       { return static_cast&lt;_Const_Link_type&gt;(__x-&gt;_M_right); }
<span class="lineNum">     692 </span>            : 
<span class="lineNum">     693 </span>            :       static const_reference
<span class="lineNum">     694 </span>            :       _S_value(_Const_Base_ptr __x)
<span class="lineNum">     695 </span>            :       { return *static_cast&lt;_Const_Link_type&gt;(__x)-&gt;_M_valptr(); }
<span class="lineNum">     696 </span>            : 
<span class="lineNum">     697 </span>            :       static const _Key&amp;
<span class="lineNum">     698 </span>            :       _S_key(_Const_Base_ptr __x)
<span class="lineNum">     699 </span>            :       { return _KeyOfValue()(_S_value(__x)); }
<span class="lineNum">     700 </span>            : 
<span class="lineNum">     701 </span>            :       static _Base_ptr
<span class="lineNum">     702 </span>            :       _S_minimum(_Base_ptr __x) _GLIBCXX_NOEXCEPT
<span class="lineNum">     703 </span>            :       { return _Rb_tree_node_base::_S_minimum(__x); }
<span class="lineNum">     704 </span>            : 
<span class="lineNum">     705 </span>            :       static _Const_Base_ptr
<span class="lineNum">     706 </span>            :       _S_minimum(_Const_Base_ptr __x) _GLIBCXX_NOEXCEPT
<span class="lineNum">     707 </span>            :       { return _Rb_tree_node_base::_S_minimum(__x); }
<span class="lineNum">     708 </span>            : 
<span class="lineNum">     709 </span>            :       static _Base_ptr
<span class="lineNum">     710 </span>            :       _S_maximum(_Base_ptr __x) _GLIBCXX_NOEXCEPT
<span class="lineNum">     711 </span>            :       { return _Rb_tree_node_base::_S_maximum(__x); }
<span class="lineNum">     712 </span>            : 
<span class="lineNum">     713 </span>            :       static _Const_Base_ptr
<span class="lineNum">     714 </span>            :       _S_maximum(_Const_Base_ptr __x) _GLIBCXX_NOEXCEPT
<span class="lineNum">     715 </span>            :       { return _Rb_tree_node_base::_S_maximum(__x); }
<span class="lineNum">     716 </span>            : 
<span class="lineNum">     717 </span>            :     public:
<span class="lineNum">     718 </span>            :       typedef _Rb_tree_iterator&lt;value_type&gt;       iterator;
<span class="lineNum">     719 </span>            :       typedef _Rb_tree_const_iterator&lt;value_type&gt; const_iterator;
<span class="lineNum">     720 </span>            : 
<span class="lineNum">     721 </span>            :       typedef std::reverse_iterator&lt;iterator&gt;       reverse_iterator;
<span class="lineNum">     722 </span>            :       typedef std::reverse_iterator&lt;const_iterator&gt; const_reverse_iterator;
<span class="lineNum">     723 </span>            : 
<span class="lineNum">     724 </span>            :     private:
<span class="lineNum">     725 </span>            :       pair&lt;_Base_ptr, _Base_ptr&gt;
<span class="lineNum">     726 </span>            :       _M_get_insert_unique_pos(const key_type&amp; __k);
<span class="lineNum">     727 </span>            : 
<span class="lineNum">     728 </span>            :       pair&lt;_Base_ptr, _Base_ptr&gt;
<span class="lineNum">     729 </span>            :       _M_get_insert_equal_pos(const key_type&amp; __k);
<span class="lineNum">     730 </span>            : 
<span class="lineNum">     731 </span>            :       pair&lt;_Base_ptr, _Base_ptr&gt;
<span class="lineNum">     732 </span>            :       _M_get_insert_hint_unique_pos(const_iterator __pos,
<span class="lineNum">     733 </span>            :                                     const key_type&amp; __k);
<span class="lineNum">     734 </span>            : 
<span class="lineNum">     735 </span>            :       pair&lt;_Base_ptr, _Base_ptr&gt;
<span class="lineNum">     736 </span>            :       _M_get_insert_hint_equal_pos(const_iterator __pos,
<span class="lineNum">     737 </span>            :                                    const key_type&amp; __k);
<span class="lineNum">     738 </span>            : 
<span class="lineNum">     739 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">     740 </span>            :       template&lt;typename _Arg, typename _NodeGen&gt;
<span class="lineNum">     741 </span>            :         iterator
<span class="lineNum">     742 </span>            :         _M_insert_(_Base_ptr __x, _Base_ptr __y, _Arg&amp;&amp; __v, _NodeGen&amp;);
<span class="lineNum">     743 </span>            : 
<span class="lineNum">     744 </span>            :       iterator
<span class="lineNum">     745 </span>            :       _M_insert_node(_Base_ptr __x, _Base_ptr __y, _Link_type __z);
<span class="lineNum">     746 </span>            : 
<span class="lineNum">     747 </span>            :       template&lt;typename _Arg&gt;
<span class="lineNum">     748 </span>            :         iterator
<span class="lineNum">     749 </span>            :         _M_insert_lower(_Base_ptr __y, _Arg&amp;&amp; __v);
<span class="lineNum">     750 </span>            : 
<span class="lineNum">     751 </span>            :       template&lt;typename _Arg&gt;
<span class="lineNum">     752 </span>            :         iterator
<span class="lineNum">     753 </span>            :         _M_insert_equal_lower(_Arg&amp;&amp; __x);
<span class="lineNum">     754 </span>            : 
<span class="lineNum">     755 </span>            :       iterator
<span class="lineNum">     756 </span>            :       _M_insert_lower_node(_Base_ptr __p, _Link_type __z);
<span class="lineNum">     757 </span>            : 
<span class="lineNum">     758 </span>            :       iterator
<span class="lineNum">     759 </span>            :       _M_insert_equal_lower_node(_Link_type __z);
<span class="lineNum">     760 </span>            : #else
<span class="lineNum">     761 </span>            :       template&lt;typename _NodeGen&gt;
<span class="lineNum">     762 </span>            :         iterator
<span class="lineNum">     763 </span>            :         _M_insert_(_Base_ptr __x, _Base_ptr __y,
<span class="lineNum">     764 </span>            :                    const value_type&amp; __v, _NodeGen&amp;);
<span class="lineNum">     765 </span>            : 
<span class="lineNum">     766 </span>            :       // _GLIBCXX_RESOLVE_LIB_DEFECTS
<span class="lineNum">     767 </span>            :       // 233. Insertion hints in associative containers.
<span class="lineNum">     768 </span>            :       iterator
<span class="lineNum">     769 </span>            :       _M_insert_lower(_Base_ptr __y, const value_type&amp; __v);
<span class="lineNum">     770 </span>            : 
<span class="lineNum">     771 </span>            :       iterator
<span class="lineNum">     772 </span>            :       _M_insert_equal_lower(const value_type&amp; __x);
<span class="lineNum">     773 </span>            : #endif
<span class="lineNum">     774 </span>            : 
<span class="lineNum">     775 </span>            :       template&lt;typename _NodeGen&gt;
<span class="lineNum">     776 </span>            :         _Link_type
<span class="lineNum">     777 </span>            :         _M_copy(_Const_Link_type __x, _Link_type __p, _NodeGen&amp;);
<span class="lineNum">     778 </span>            : 
<span class="lineNum">     779 </span>            :       _Link_type
<span class="lineNum">     780 </span>            :       _M_copy(_Const_Link_type __x, _Link_type __p)
<span class="lineNum">     781 </span>            :       {
<span class="lineNum">     782 </span>            :         _Alloc_node __an(*this);
<span class="lineNum">     783 </span>            :         return _M_copy(__x, __p, __an);
<span class="lineNum">     784 </span>            :       }
<span class="lineNum">     785 </span>            : 
<span class="lineNum">     786 </span>            :       void
<span class="lineNum">     787 </span>            :       _M_erase(_Link_type __x);
<span class="lineNum">     788 </span>            : 
<span class="lineNum">     789 </span>            :       iterator
<span class="lineNum">     790 </span>            :       _M_lower_bound(_Link_type __x, _Link_type __y,
<span class="lineNum">     791 </span>            :                      const _Key&amp; __k);
<span class="lineNum">     792 </span>            : 
<span class="lineNum">     793 </span>            :       const_iterator
<span class="lineNum">     794 </span>            :       _M_lower_bound(_Const_Link_type __x, _Const_Link_type __y,
<span class="lineNum">     795 </span>            :                      const _Key&amp; __k) const;
<span class="lineNum">     796 </span>            : 
<span class="lineNum">     797 </span>            :       iterator
<span class="lineNum">     798 </span>            :       _M_upper_bound(_Link_type __x, _Link_type __y,
<span class="lineNum">     799 </span>            :                      const _Key&amp; __k);
<span class="lineNum">     800 </span>            : 
<span class="lineNum">     801 </span>            :       const_iterator
<span class="lineNum">     802 </span>            :       _M_upper_bound(_Const_Link_type __x, _Const_Link_type __y,
<span class="lineNum">     803 </span>            :                      const _Key&amp; __k) const;
<span class="lineNum">     804 </span>            : 
<span class="lineNum">     805 </span>            :     public:
<span class="lineNum">     806 </span>            :       // allocation/deallocation
<span class="lineNum">     807 </span>            :       _Rb_tree() { }
<span class="lineNum">     808 </span>            : 
<span class="lineNum">     809 </span>            :       _Rb_tree(const _Compare&amp; __comp,
<span class="lineNum">     810 </span>            :                const allocator_type&amp; __a = allocator_type())
<span class="lineNum">     811 </span>            :       : _M_impl(__comp, _Node_allocator(__a)) { }
<span class="lineNum">     812 </span>            : 
<span class="lineNum">     813 </span>            :       _Rb_tree(const _Rb_tree&amp; __x)
<span class="lineNum">     814 </span>            :       : _M_impl(__x._M_impl._M_key_compare,
<span class="lineNum">     815 </span>            :                 _Alloc_traits::_S_select_on_copy(__x._M_get_Node_allocator()))
<span class="lineNum">     816 </span>            :       {
<span class="lineNum">     817 </span>            :         if (__x._M_root() != 0)
<span class="lineNum">     818 </span>            :           {
<span class="lineNum">     819 </span>            :             _M_root() = _M_copy(__x._M_begin(), _M_end());
<span class="lineNum">     820 </span>            :             _M_leftmost() = _S_minimum(_M_root());
<span class="lineNum">     821 </span>            :             _M_rightmost() = _S_maximum(_M_root());
<span class="lineNum">     822 </span>            :             _M_impl._M_node_count = __x._M_impl._M_node_count;
<span class="lineNum">     823 </span>            :           }
<span class="lineNum">     824 </span>            :       }
<span class="lineNum">     825 </span>            : 
<span class="lineNum">     826 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">     827 </span>            :       _Rb_tree(const allocator_type&amp; __a)
<span class="lineNum">     828 </span>            :       : _M_impl(_Compare(), _Node_allocator(__a))
<span class="lineNum">     829 </span>            :       { }
<span class="lineNum">     830 </span>            : 
<span class="lineNum">     831 </span>            :       _Rb_tree(const _Rb_tree&amp; __x, const allocator_type&amp; __a)
<span class="lineNum">     832 </span>            :       : _M_impl(__x._M_impl._M_key_compare, _Node_allocator(__a))
<span class="lineNum">     833 </span>            :       {
<span class="lineNum">     834 </span>            :         if (__x._M_root() != nullptr)
<span class="lineNum">     835 </span>            :           {
<span class="lineNum">     836 </span>            :             _M_root() = _M_copy(__x._M_begin(), _M_end());
<span class="lineNum">     837 </span>            :             _M_leftmost() = _S_minimum(_M_root());
<span class="lineNum">     838 </span>            :             _M_rightmost() = _S_maximum(_M_root());
<span class="lineNum">     839 </span>            :             _M_impl._M_node_count = __x._M_impl._M_node_count;
<span class="lineNum">     840 </span>            :           }
<span class="lineNum">     841 </span>            :       }
<span class="lineNum">     842 </span>            : 
<span class="lineNum">     843 </span>            :       _Rb_tree(_Rb_tree&amp;&amp; __x)
<span class="lineNum">     844 </span>            :       : _M_impl(__x._M_impl._M_key_compare, __x._M_get_Node_allocator())
<span class="lineNum">     845 </span>            :       {
<span class="lineNum">     846 </span>            :         if (__x._M_root() != 0)
<span class="lineNum">     847 </span>            :           _M_move_data(__x, std::true_type());
<span class="lineNum">     848 </span>            :       }
<span class="lineNum">     849 </span>            : 
<span class="lineNum">     850 </span>            :       _Rb_tree(_Rb_tree&amp;&amp; __x, const allocator_type&amp; __a)
<span class="lineNum">     851 </span>            :       : _Rb_tree(std::move(__x), _Node_allocator(__a))
<span class="lineNum">     852 </span>            :       { }
<span class="lineNum">     853 </span>            : 
<span class="lineNum">     854 </span>            :       _Rb_tree(_Rb_tree&amp;&amp; __x, _Node_allocator&amp;&amp; __a);
<span class="lineNum">     855 </span>            : #endif
<span class="lineNum">     856 </span>            : 
<span class="lineNum">     857 </span>            :       ~_Rb_tree() _GLIBCXX_NOEXCEPT
<span class="lineNum">     858 </span><span class="lineCov">         26 :       { _M_erase(_M_begin()); }</span>
<span class="lineNum">     859 </span>            : 
<span class="lineNum">     860 </span>            :       _Rb_tree&amp;
<span class="lineNum">     861 </span>            :       operator=(const _Rb_tree&amp; __x);
<span class="lineNum">     862 </span>            : 
<span class="lineNum">     863 </span>            :       // Accessors.
<span class="lineNum">     864 </span>            :       _Compare
<span class="lineNum">     865 </span>            :       key_comp() const
<span class="lineNum">     866 </span>            :       { return _M_impl._M_key_compare; }
<span class="lineNum">     867 </span>            : 
<span class="lineNum">     868 </span>            :       iterator
<span class="lineNum">     869 </span>            :       begin() _GLIBCXX_NOEXCEPT
<span class="lineNum">     870 </span>            :       { return iterator(this-&gt;_M_impl._M_header._M_left); }
<span class="lineNum">     871 </span>            : 
<span class="lineNum">     872 </span>            :       const_iterator
<span class="lineNum">     873 </span>            :       begin() const _GLIBCXX_NOEXCEPT
<span class="lineNum">     874 </span>            :       { return const_iterator(this-&gt;_M_impl._M_header._M_left); }
<span class="lineNum">     875 </span>            : 
<span class="lineNum">     876 </span>            :       iterator
<span class="lineNum">     877 </span>            :       end() _GLIBCXX_NOEXCEPT
<span class="lineNum">     878 </span><span class="lineCov">        252 :       { return iterator(&amp;this-&gt;_M_impl._M_header); }</span>
<span class="lineNum">     879 </span>            : 
<span class="lineNum">     880 </span>            :       const_iterator
<span class="lineNum">     881 </span>            :       end() const _GLIBCXX_NOEXCEPT
<span class="lineNum">     882 </span><span class="lineCov">        158 :       { return const_iterator(&amp;this-&gt;_M_impl._M_header); }</span>
<span class="lineNum">     883 </span>            : 
<span class="lineNum">     884 </span>            :       reverse_iterator
<span class="lineNum">     885 </span>            :       rbegin() _GLIBCXX_NOEXCEPT
<span class="lineNum">     886 </span>            :       { return reverse_iterator(end()); }
<span class="lineNum">     887 </span>            : 
<span class="lineNum">     888 </span>            :       const_reverse_iterator
<span class="lineNum">     889 </span>            :       rbegin() const _GLIBCXX_NOEXCEPT
<span class="lineNum">     890 </span>            :       { return const_reverse_iterator(end()); }
<span class="lineNum">     891 </span>            : 
<span class="lineNum">     892 </span>            :       reverse_iterator
<span class="lineNum">     893 </span>            :       rend() _GLIBCXX_NOEXCEPT
<span class="lineNum">     894 </span>            :       { return reverse_iterator(begin()); }
<span class="lineNum">     895 </span>            : 
<span class="lineNum">     896 </span>            :       const_reverse_iterator
<span class="lineNum">     897 </span>            :       rend() const _GLIBCXX_NOEXCEPT
<span class="lineNum">     898 </span>            :       { return const_reverse_iterator(begin()); }
<span class="lineNum">     899 </span>            : 
<span class="lineNum">     900 </span>            :       bool
<span class="lineNum">     901 </span>            :       empty() const _GLIBCXX_NOEXCEPT
<span class="lineNum">     902 </span>            :       { return _M_impl._M_node_count == 0; }
<span class="lineNum">     903 </span>            : 
<span class="lineNum">     904 </span>            :       size_type
<span class="lineNum">     905 </span>            :       size() const _GLIBCXX_NOEXCEPT 
<span class="lineNum">     906 </span>            :       { return _M_impl._M_node_count; }
<span class="lineNum">     907 </span>            : 
<span class="lineNum">     908 </span>            :       size_type
<span class="lineNum">     909 </span>            :       max_size() const _GLIBCXX_NOEXCEPT
<span class="lineNum">     910 </span>            :       { return _Alloc_traits::max_size(_M_get_Node_allocator()); }
<span class="lineNum">     911 </span>            : 
<span class="lineNum">     912 </span>            :       void
<span class="lineNum">     913 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">     914 </span>            :       swap(_Rb_tree&amp; __t) noexcept(_Alloc_traits::_S_nothrow_swap());
<span class="lineNum">     915 </span>            : #else
<span class="lineNum">     916 </span>            :       swap(_Rb_tree&amp; __t);
<span class="lineNum">     917 </span>            : #endif
<span class="lineNum">     918 </span>            : 
<span class="lineNum">     919 </span>            :       // Insert/erase.
<span class="lineNum">     920 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">     921 </span>            :       template&lt;typename _Arg&gt;
<span class="lineNum">     922 </span>            :         pair&lt;iterator, bool&gt;
<span class="lineNum">     923 </span>            :         _M_insert_unique(_Arg&amp;&amp; __x);
<span class="lineNum">     924 </span>            : 
<span class="lineNum">     925 </span>            :       template&lt;typename _Arg&gt;
<span class="lineNum">     926 </span>            :         iterator
<span class="lineNum">     927 </span>            :         _M_insert_equal(_Arg&amp;&amp; __x);
<span class="lineNum">     928 </span>            : 
<span class="lineNum">     929 </span>            :       template&lt;typename _Arg, typename _NodeGen&gt;
<span class="lineNum">     930 </span>            :         iterator
<span class="lineNum">     931 </span>            :         _M_insert_unique_(const_iterator __pos, _Arg&amp;&amp; __x, _NodeGen&amp;);
<span class="lineNum">     932 </span>            : 
<span class="lineNum">     933 </span>            :       template&lt;typename _Arg&gt;
<span class="lineNum">     934 </span>            :         iterator
<span class="lineNum">     935 </span>            :         _M_insert_unique_(const_iterator __pos, _Arg&amp;&amp; __x)
<span class="lineNum">     936 </span>            :         {
<span class="lineNum">     937 </span>            :           _Alloc_node __an(*this);
<span class="lineNum">     938 </span>            :           return _M_insert_unique_(__pos, std::forward&lt;_Arg&gt;(__x), __an);
<span class="lineNum">     939 </span>            :         }
<span class="lineNum">     940 </span>            : 
<span class="lineNum">     941 </span>            :       template&lt;typename _Arg, typename _NodeGen&gt;
<span class="lineNum">     942 </span>            :         iterator
<span class="lineNum">     943 </span>            :         _M_insert_equal_(const_iterator __pos, _Arg&amp;&amp; __x, _NodeGen&amp;);
<span class="lineNum">     944 </span>            : 
<span class="lineNum">     945 </span>            :       template&lt;typename _Arg&gt;
<span class="lineNum">     946 </span>            :         iterator
<span class="lineNum">     947 </span>            :         _M_insert_equal_(const_iterator __pos, _Arg&amp;&amp; __x)
<span class="lineNum">     948 </span>            :         {
<span class="lineNum">     949 </span>            :           _Alloc_node __an(*this);
<span class="lineNum">     950 </span>            :           return _M_insert_equal_(__pos, std::forward&lt;_Arg&gt;(__x), __an);
<span class="lineNum">     951 </span>            :         }
<span class="lineNum">     952 </span>            : 
<span class="lineNum">     953 </span>            :       template&lt;typename... _Args&gt;
<span class="lineNum">     954 </span>            :         pair&lt;iterator, bool&gt;
<span class="lineNum">     955 </span>            :         _M_emplace_unique(_Args&amp;&amp;... __args);
<span class="lineNum">     956 </span>            : 
<span class="lineNum">     957 </span>            :       template&lt;typename... _Args&gt;
<span class="lineNum">     958 </span>            :         iterator
<span class="lineNum">     959 </span>            :         _M_emplace_equal(_Args&amp;&amp;... __args);
<span class="lineNum">     960 </span>            : 
<span class="lineNum">     961 </span>            :       template&lt;typename... _Args&gt;
<span class="lineNum">     962 </span>            :         iterator
<span class="lineNum">     963 </span>            :         _M_emplace_hint_unique(const_iterator __pos, _Args&amp;&amp;... __args);
<span class="lineNum">     964 </span>            : 
<span class="lineNum">     965 </span>            :       template&lt;typename... _Args&gt;
<span class="lineNum">     966 </span>            :         iterator
<span class="lineNum">     967 </span>            :         _M_emplace_hint_equal(const_iterator __pos, _Args&amp;&amp;... __args);
<span class="lineNum">     968 </span>            : #else
<span class="lineNum">     969 </span>            :       pair&lt;iterator, bool&gt;
<span class="lineNum">     970 </span>            :       _M_insert_unique(const value_type&amp; __x);
<span class="lineNum">     971 </span>            : 
<span class="lineNum">     972 </span>            :       iterator
<span class="lineNum">     973 </span>            :       _M_insert_equal(const value_type&amp; __x);
<span class="lineNum">     974 </span>            : 
<span class="lineNum">     975 </span>            :       template&lt;typename _NodeGen&gt;
<span class="lineNum">     976 </span>            :         iterator
<span class="lineNum">     977 </span>            :         _M_insert_unique_(const_iterator __pos, const value_type&amp; __x,
<span class="lineNum">     978 </span>            :                           _NodeGen&amp;);
<span class="lineNum">     979 </span>            : 
<span class="lineNum">     980 </span>            :       iterator
<span class="lineNum">     981 </span>            :       _M_insert_unique_(const_iterator __pos, const value_type&amp; __x)
<span class="lineNum">     982 </span>            :       {
<span class="lineNum">     983 </span>            :         _Alloc_node __an(*this);
<span class="lineNum">     984 </span><span class="lineCov">        222 :         return _M_insert_unique_(__pos, __x, __an);</span>
<span class="lineNum">     985 </span>            :       }
<span class="lineNum">     986 </span>            : 
<span class="lineNum">     987 </span>            :       template&lt;typename _NodeGen&gt;
<span class="lineNum">     988 </span>            :         iterator
<span class="lineNum">     989 </span>            :         _M_insert_equal_(const_iterator __pos, const value_type&amp; __x,
<span class="lineNum">     990 </span>            :                          _NodeGen&amp;);
<span class="lineNum">     991 </span>            :       iterator
<span class="lineNum">     992 </span>            :       _M_insert_equal_(const_iterator __pos, const value_type&amp; __x)
<span class="lineNum">     993 </span>            :       {
<span class="lineNum">     994 </span>            :         _Alloc_node __an(*this);
<span class="lineNum">     995 </span>            :         return _M_insert_equal_(__pos, __x, __an);
<span class="lineNum">     996 </span>            :       }
<span class="lineNum">     997 </span>            : #endif
<span class="lineNum">     998 </span>            : 
<span class="lineNum">     999 </span>            :       template&lt;typename _InputIterator&gt;
<span class="lineNum">    1000 </span>            :         void
<span class="lineNum">    1001 </span>            :         _M_insert_unique(_InputIterator __first, _InputIterator __last);
<span class="lineNum">    1002 </span>            : 
<span class="lineNum">    1003 </span>            :       template&lt;typename _InputIterator&gt;
<span class="lineNum">    1004 </span>            :         void
<span class="lineNum">    1005 </span>            :         _M_insert_equal(_InputIterator __first, _InputIterator __last);
<span class="lineNum">    1006 </span>            : 
<span class="lineNum">    1007 </span>            :     private:
<span class="lineNum">    1008 </span>            :       void
<span class="lineNum">    1009 </span>            :       _M_erase_aux(const_iterator __position);
<span class="lineNum">    1010 </span>            : 
<span class="lineNum">    1011 </span>            :       void
<span class="lineNum">    1012 </span>            :       _M_erase_aux(const_iterator __first, const_iterator __last);
<span class="lineNum">    1013 </span>            : 
<span class="lineNum">    1014 </span>            :     public:
<span class="lineNum">    1015 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">    1016 </span>            :       // _GLIBCXX_RESOLVE_LIB_DEFECTS
<span class="lineNum">    1017 </span>            :       // DR 130. Associative erase should return an iterator.
<span class="lineNum">    1018 </span>            :       _GLIBCXX_ABI_TAG_CXX11
<span class="lineNum">    1019 </span>            :       iterator
<span class="lineNum">    1020 </span>            :       erase(const_iterator __position)
<span class="lineNum">    1021 </span>            :       {
<span class="lineNum">    1022 </span>            :         const_iterator __result = __position;
<span class="lineNum">    1023 </span>            :         ++__result;
<span class="lineNum">    1024 </span>            :         _M_erase_aux(__position);
<span class="lineNum">    1025 </span>            :         return __result._M_const_cast();
<span class="lineNum">    1026 </span>            :       }
<span class="lineNum">    1027 </span>            : 
<span class="lineNum">    1028 </span>            :       // LWG 2059.
<span class="lineNum">    1029 </span>            :       _GLIBCXX_ABI_TAG_CXX11
<span class="lineNum">    1030 </span>            :       iterator
<span class="lineNum">    1031 </span>            :       erase(iterator __position)
<span class="lineNum">    1032 </span>            :       {
<span class="lineNum">    1033 </span>            :         iterator __result = __position;
<span class="lineNum">    1034 </span>            :         ++__result;
<span class="lineNum">    1035 </span>            :         _M_erase_aux(__position);
<span class="lineNum">    1036 </span>            :         return __result;
<span class="lineNum">    1037 </span>            :       }
<span class="lineNum">    1038 </span>            : #else
<span class="lineNum">    1039 </span>            :       void
<span class="lineNum">    1040 </span>            :       erase(iterator __position)
<span class="lineNum">    1041 </span>            :       { _M_erase_aux(__position); }
<span class="lineNum">    1042 </span>            : 
<span class="lineNum">    1043 </span>            :       void
<span class="lineNum">    1044 </span>            :       erase(const_iterator __position)
<span class="lineNum">    1045 </span><span class="lineCov">         13 :       { _M_erase_aux(__position); }</span>
<span class="lineNum">    1046 </span>            : #endif
<span class="lineNum">    1047 </span>            :       size_type
<span class="lineNum">    1048 </span>            :       erase(const key_type&amp; __x);
<span class="lineNum">    1049 </span>            : 
<span class="lineNum">    1050 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">    1051 </span>            :       // _GLIBCXX_RESOLVE_LIB_DEFECTS
<span class="lineNum">    1052 </span>            :       // DR 130. Associative erase should return an iterator.
<span class="lineNum">    1053 </span>            :       _GLIBCXX_ABI_TAG_CXX11
<span class="lineNum">    1054 </span>            :       iterator
<span class="lineNum">    1055 </span>            :       erase(const_iterator __first, const_iterator __last)
<span class="lineNum">    1056 </span>            :       {
<span class="lineNum">    1057 </span>            :         _M_erase_aux(__first, __last);
<span class="lineNum">    1058 </span>            :         return __last._M_const_cast();
<span class="lineNum">    1059 </span>            :       }
<span class="lineNum">    1060 </span>            : #else
<span class="lineNum">    1061 </span>            :       void
<span class="lineNum">    1062 </span>            :       erase(iterator __first, iterator __last)
<span class="lineNum">    1063 </span><span class="lineCov">         13 :       { _M_erase_aux(__first, __last); }</span>
<span class="lineNum">    1064 </span>            : 
<span class="lineNum">    1065 </span>            :       void
<span class="lineNum">    1066 </span>            :       erase(const_iterator __first, const_iterator __last)
<span class="lineNum">    1067 </span>            :       { _M_erase_aux(__first, __last); }
<span class="lineNum">    1068 </span>            : #endif
<span class="lineNum">    1069 </span>            :       void
<span class="lineNum">    1070 </span>            :       erase(const key_type* __first, const key_type* __last);
<span class="lineNum">    1071 </span>            : 
<span class="lineNum">    1072 </span>            :       void
<span class="lineNum">    1073 </span>            :       clear() _GLIBCXX_NOEXCEPT
<span class="lineNum">    1074 </span>            :       {
<span class="lineNum">    1075 </span><span class="lineNoCov">          0 :         _M_erase(_M_begin());</span>
<span class="lineNum">    1076 </span>            :         _M_impl._M_reset();
<span class="lineNum">    1077 </span>            :       }
<span class="lineNum">    1078 </span>            : 
<span class="lineNum">    1079 </span>            :       // Set operations.
<span class="lineNum">    1080 </span>            :       iterator
<span class="lineNum">    1081 </span>            :       find(const key_type&amp; __k);
<span class="lineNum">    1082 </span>            : 
<span class="lineNum">    1083 </span>            :       const_iterator
<span class="lineNum">    1084 </span>            :       find(const key_type&amp; __k) const;
<span class="lineNum">    1085 </span>            : 
<span class="lineNum">    1086 </span>            :       size_type
<span class="lineNum">    1087 </span>            :       count(const key_type&amp; __k) const;
<a name="1088"><span class="lineNum">    1088 </span>            : </a>
<span class="lineNum">    1089 </span>            :       iterator
<span class="lineNum">    1090 </span><span class="lineCov">        231 :       lower_bound(const key_type&amp; __k)</span>
<span class="lineNum">    1091 </span><span class="lineCov">        231 :       { return _M_lower_bound(_M_begin(), _M_end(), __k); }</span>
<span class="lineNum">    1092 </span>            : 
<span class="lineNum">    1093 </span>            :       const_iterator
<span class="lineNum">    1094 </span>            :       lower_bound(const key_type&amp; __k) const
<span class="lineNum">    1095 </span>            :       { return _M_lower_bound(_M_begin(), _M_end(), __k); }
<span class="lineNum">    1096 </span>            : 
<span class="lineNum">    1097 </span>            :       iterator
<span class="lineNum">    1098 </span>            :       upper_bound(const key_type&amp; __k)
<span class="lineNum">    1099 </span>            :       { return _M_upper_bound(_M_begin(), _M_end(), __k); }
<span class="lineNum">    1100 </span>            : 
<span class="lineNum">    1101 </span>            :       const_iterator
<span class="lineNum">    1102 </span>            :       upper_bound(const key_type&amp; __k) const
<span class="lineNum">    1103 </span>            :       { return _M_upper_bound(_M_begin(), _M_end(), __k); }
<span class="lineNum">    1104 </span>            : 
<span class="lineNum">    1105 </span>            :       pair&lt;iterator, iterator&gt;
<span class="lineNum">    1106 </span>            :       equal_range(const key_type&amp; __k);
<span class="lineNum">    1107 </span>            : 
<span class="lineNum">    1108 </span>            :       pair&lt;const_iterator, const_iterator&gt;
<span class="lineNum">    1109 </span>            :       equal_range(const key_type&amp; __k) const;
<span class="lineNum">    1110 </span>            : 
<span class="lineNum">    1111 </span>            : #if __cplusplus &gt; 201103L
<span class="lineNum">    1112 </span>            :       template&lt;typename _Cmp, typename _Kt, typename = __void_t&lt;&gt;&gt;
<span class="lineNum">    1113 </span>            :         struct __is_transparent { };
<span class="lineNum">    1114 </span>            : 
<span class="lineNum">    1115 </span>            :       template&lt;typename _Cmp, typename _Kt&gt;
<span class="lineNum">    1116 </span>            :         struct
<span class="lineNum">    1117 </span>            :         __is_transparent&lt;_Cmp, _Kt, __void_t&lt;typename _Cmp::is_transparent&gt;&gt;
<span class="lineNum">    1118 </span>            :         { typedef void type; };
<span class="lineNum">    1119 </span>            : 
<span class="lineNum">    1120 </span>            :       static auto _S_iter(_Link_type __x) { return iterator(__x); }
<span class="lineNum">    1121 </span>            : 
<span class="lineNum">    1122 </span>            :       static auto _S_iter(_Const_Link_type __x) { return const_iterator(__x); }
<span class="lineNum">    1123 </span>            : 
<span class="lineNum">    1124 </span>            :       template&lt;typename _Cmp, typename _Link, typename _Kt&gt;
<span class="lineNum">    1125 </span>            :         static auto
<span class="lineNum">    1126 </span>            :         _S_lower_bound_tr(_Cmp&amp; __cmp, _Link __x, _Link __y, const _Kt&amp; __k)
<span class="lineNum">    1127 </span>            :         {
<span class="lineNum">    1128 </span>            :           while (__x != 0)
<span class="lineNum">    1129 </span>            :             if (!__cmp(_S_key(__x), __k))
<span class="lineNum">    1130 </span>            :               __y = __x, __x = _S_left(__x);
<span class="lineNum">    1131 </span>            :             else
<span class="lineNum">    1132 </span>            :               __x = _S_right(__x);
<span class="lineNum">    1133 </span>            :           return _S_iter(__y);
<span class="lineNum">    1134 </span>            :         }
<span class="lineNum">    1135 </span>            : 
<span class="lineNum">    1136 </span>            :       template&lt;typename _Cmp, typename _Link, typename _Kt&gt;
<span class="lineNum">    1137 </span>            :         static auto
<span class="lineNum">    1138 </span>            :         _S_upper_bound_tr(_Cmp&amp; __cmp, _Link __x, _Link __y, const _Kt&amp; __k)
<span class="lineNum">    1139 </span>            :         {
<span class="lineNum">    1140 </span>            :           while (__x != 0)
<span class="lineNum">    1141 </span>            :             if (__cmp(__k, _S_key(__x)))
<span class="lineNum">    1142 </span>            :               __y = __x, __x = _S_left(__x);
<span class="lineNum">    1143 </span>            :             else
<span class="lineNum">    1144 </span>            :               __x = _S_right(__x);
<span class="lineNum">    1145 </span>            :           return _S_iter(__y);
<span class="lineNum">    1146 </span>            :         }
<span class="lineNum">    1147 </span>            : 
<span class="lineNum">    1148 </span>            :       template&lt;typename _Kt,
<span class="lineNum">    1149 </span>            :                typename _Req = typename __is_transparent&lt;_Compare, _Kt&gt;::type&gt;
<span class="lineNum">    1150 </span>            :         iterator
<span class="lineNum">    1151 </span>            :         _M_find_tr(const _Kt&amp; __k)
<span class="lineNum">    1152 </span>            :         {
<span class="lineNum">    1153 </span>            :           auto&amp; __cmp = _M_impl._M_key_compare;
<span class="lineNum">    1154 </span>            :           auto __j = _S_lower_bound_tr(__cmp, _M_begin(), _M_end(), __k);
<span class="lineNum">    1155 </span>            :           return (__j == end() || __cmp(__k, _S_key(__j._M_node)))
<span class="lineNum">    1156 </span>            :             ? end() : __j;
<span class="lineNum">    1157 </span>            :         }
<span class="lineNum">    1158 </span>            : 
<span class="lineNum">    1159 </span>            :       template&lt;typename _Kt,
<span class="lineNum">    1160 </span>            :                typename _Req = typename __is_transparent&lt;_Compare, _Kt&gt;::type&gt;
<span class="lineNum">    1161 </span>            :         const_iterator
<span class="lineNum">    1162 </span>            :         _M_find_tr(const _Kt&amp; __k) const
<span class="lineNum">    1163 </span>            :         {
<span class="lineNum">    1164 </span>            :           auto&amp; __cmp = _M_impl._M_key_compare;
<span class="lineNum">    1165 </span>            :           auto __j = _S_lower_bound_tr(__cmp, _M_begin(), _M_end(), __k);
<span class="lineNum">    1166 </span>            :           return (__j == end() || __cmp(__k, _S_key(__j._M_node)))
<span class="lineNum">    1167 </span>            :             ? end() : __j;
<span class="lineNum">    1168 </span>            :         }
<span class="lineNum">    1169 </span>            : 
<span class="lineNum">    1170 </span>            :       template&lt;typename _Kt,
<span class="lineNum">    1171 </span>            :                typename _Req = typename __is_transparent&lt;_Compare, _Kt&gt;::type&gt;
<span class="lineNum">    1172 </span>            :         size_type
<span class="lineNum">    1173 </span>            :         _M_count_tr(const _Kt&amp; __k) const
<span class="lineNum">    1174 </span>            :         {
<span class="lineNum">    1175 </span>            :           auto __p = _M_equal_range_tr(__k);
<span class="lineNum">    1176 </span>            :           return std::distance(__p.first, __p.second);
<span class="lineNum">    1177 </span>            :         }
<span class="lineNum">    1178 </span>            : 
<span class="lineNum">    1179 </span>            :       template&lt;typename _Kt,
<span class="lineNum">    1180 </span>            :                typename _Req = typename __is_transparent&lt;_Compare, _Kt&gt;::type&gt;
<span class="lineNum">    1181 </span>            :         iterator
<span class="lineNum">    1182 </span>            :         _M_lower_bound_tr(const _Kt&amp; __k)
<span class="lineNum">    1183 </span>            :         {
<span class="lineNum">    1184 </span>            :           auto&amp; __cmp = _M_impl._M_key_compare;
<span class="lineNum">    1185 </span>            :           return _S_lower_bound_tr(__cmp, _M_begin(), _M_end(), __k);
<span class="lineNum">    1186 </span>            :         }
<span class="lineNum">    1187 </span>            : 
<span class="lineNum">    1188 </span>            :       template&lt;typename _Kt,
<span class="lineNum">    1189 </span>            :                typename _Req = typename __is_transparent&lt;_Compare, _Kt&gt;::type&gt;
<span class="lineNum">    1190 </span>            :         const_iterator
<span class="lineNum">    1191 </span>            :         _M_lower_bound_tr(const _Kt&amp; __k) const
<span class="lineNum">    1192 </span>            :         {
<span class="lineNum">    1193 </span>            :           auto&amp; __cmp = _M_impl._M_key_compare;
<span class="lineNum">    1194 </span>            :           return _S_lower_bound_tr(__cmp, _M_begin(), _M_end(), __k);
<span class="lineNum">    1195 </span>            :         }
<span class="lineNum">    1196 </span>            : 
<span class="lineNum">    1197 </span>            :       template&lt;typename _Kt,
<span class="lineNum">    1198 </span>            :                typename _Req = typename __is_transparent&lt;_Compare, _Kt&gt;::type&gt;
<span class="lineNum">    1199 </span>            :         iterator
<span class="lineNum">    1200 </span>            :         _M_upper_bound_tr(const _Kt&amp; __k)
<span class="lineNum">    1201 </span>            :         {
<span class="lineNum">    1202 </span>            :           auto&amp; __cmp = _M_impl._M_key_compare;
<span class="lineNum">    1203 </span>            :           return _S_upper_bound_tr(__cmp, _M_begin(), _M_end(), __k);
<span class="lineNum">    1204 </span>            :         }
<span class="lineNum">    1205 </span>            : 
<span class="lineNum">    1206 </span>            :       template&lt;typename _Kt,
<span class="lineNum">    1207 </span>            :                typename _Req = typename __is_transparent&lt;_Compare, _Kt&gt;::type&gt;
<span class="lineNum">    1208 </span>            :         const_iterator
<span class="lineNum">    1209 </span>            :         _M_upper_bound_tr(const _Kt&amp; __k) const
<span class="lineNum">    1210 </span>            :         {
<span class="lineNum">    1211 </span>            :           auto&amp; __cmp = _M_impl._M_key_compare;
<span class="lineNum">    1212 </span>            :           return _S_upper_bound_tr(__cmp, _M_begin(), _M_end(), __k);
<span class="lineNum">    1213 </span>            :         }
<span class="lineNum">    1214 </span>            : 
<span class="lineNum">    1215 </span>            :       template&lt;typename _Kt,
<span class="lineNum">    1216 </span>            :                typename _Req = typename __is_transparent&lt;_Compare, _Kt&gt;::type&gt;
<span class="lineNum">    1217 </span>            :         pair&lt;iterator, iterator&gt;
<span class="lineNum">    1218 </span>            :         _M_equal_range_tr(const _Kt&amp; __k)
<span class="lineNum">    1219 </span>            :         {
<span class="lineNum">    1220 </span>            :           auto __low = _M_lower_bound_tr(__k);
<span class="lineNum">    1221 </span>            :           auto __high = __low;
<span class="lineNum">    1222 </span>            :           auto&amp; __cmp = _M_impl._M_key_compare;
<span class="lineNum">    1223 </span>            :           while (__high != end() &amp;&amp; !__cmp(__k, _S_key(__high._M_node)))
<span class="lineNum">    1224 </span>            :             ++__high;
<span class="lineNum">    1225 </span>            :           return { __low, __high };
<span class="lineNum">    1226 </span>            :         }
<span class="lineNum">    1227 </span>            : 
<span class="lineNum">    1228 </span>            :       template&lt;typename _Kt,
<span class="lineNum">    1229 </span>            :                typename _Req = typename __is_transparent&lt;_Compare, _Kt&gt;::type&gt;
<span class="lineNum">    1230 </span>            :         pair&lt;const_iterator, const_iterator&gt;
<span class="lineNum">    1231 </span>            :         _M_equal_range_tr(const _Kt&amp; __k) const
<span class="lineNum">    1232 </span>            :         {
<span class="lineNum">    1233 </span>            :           auto __low = _M_lower_bound_tr(__k);
<span class="lineNum">    1234 </span>            :           auto __high = __low;
<span class="lineNum">    1235 </span>            :           auto&amp; __cmp = _M_impl._M_key_compare;
<span class="lineNum">    1236 </span>            :           while (__high != end() &amp;&amp; !__cmp(__k, _S_key(__high._M_node)))
<span class="lineNum">    1237 </span>            :             ++__high;
<span class="lineNum">    1238 </span>            :           return { __low, __high };
<span class="lineNum">    1239 </span>            :         }
<span class="lineNum">    1240 </span>            : #endif
<span class="lineNum">    1241 </span>            : 
<span class="lineNum">    1242 </span>            :       // Debugging.
<span class="lineNum">    1243 </span>            :       bool
<span class="lineNum">    1244 </span>            :       __rb_verify() const;
<span class="lineNum">    1245 </span>            : 
<span class="lineNum">    1246 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">    1247 </span>            :       _Rb_tree&amp;
<span class="lineNum">    1248 </span>            :       operator=(_Rb_tree&amp;&amp;) noexcept(_Alloc_traits::_S_nothrow_move());
<span class="lineNum">    1249 </span>            : 
<span class="lineNum">    1250 </span>            :       template&lt;typename _Iterator&gt;
<span class="lineNum">    1251 </span>            :         void
<span class="lineNum">    1252 </span>            :         _M_assign_unique(_Iterator, _Iterator);
<span class="lineNum">    1253 </span>            : 
<span class="lineNum">    1254 </span>            :       template&lt;typename _Iterator&gt;
<span class="lineNum">    1255 </span>            :         void
<span class="lineNum">    1256 </span>            :         _M_assign_equal(_Iterator, _Iterator);
<span class="lineNum">    1257 </span>            : 
<span class="lineNum">    1258 </span>            :     private:
<span class="lineNum">    1259 </span>            :       // Move elements from container with equal allocator.
<span class="lineNum">    1260 </span>            :       void
<span class="lineNum">    1261 </span>            :       _M_move_data(_Rb_tree&amp;, std::true_type);
<span class="lineNum">    1262 </span>            : 
<span class="lineNum">    1263 </span>            :       // Move elements from container with possibly non-equal allocator,
<span class="lineNum">    1264 </span>            :       // which might result in a copy not a move.
<span class="lineNum">    1265 </span>            :       void
<span class="lineNum">    1266 </span>            :       _M_move_data(_Rb_tree&amp;, std::false_type);
<span class="lineNum">    1267 </span>            : #endif
<span class="lineNum">    1268 </span>            :     };
<span class="lineNum">    1269 </span>            : 
<span class="lineNum">    1270 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1271 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1272 </span>            :     inline bool
<span class="lineNum">    1273 </span>            :     operator==(const _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __x,
<span class="lineNum">    1274 </span>            :                const _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __y)
<span class="lineNum">    1275 </span>            :     {
<span class="lineNum">    1276 </span>            :       return __x.size() == __y.size()
<span class="lineNum">    1277 </span>            :              &amp;&amp; std::equal(__x.begin(), __x.end(), __y.begin());
<span class="lineNum">    1278 </span>            :     }
<span class="lineNum">    1279 </span>            : 
<span class="lineNum">    1280 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1281 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1282 </span>            :     inline bool
<span class="lineNum">    1283 </span>            :     operator&lt;(const _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __x,
<span class="lineNum">    1284 </span>            :               const _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __y)
<span class="lineNum">    1285 </span>            :     {
<span class="lineNum">    1286 </span>            :       return std::lexicographical_compare(__x.begin(), __x.end(), 
<span class="lineNum">    1287 </span>            :                                           __y.begin(), __y.end());
<span class="lineNum">    1288 </span>            :     }
<span class="lineNum">    1289 </span>            : 
<span class="lineNum">    1290 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1291 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1292 </span>            :     inline bool
<span class="lineNum">    1293 </span>            :     operator!=(const _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __x,
<span class="lineNum">    1294 </span>            :                const _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __y)
<span class="lineNum">    1295 </span>            :     { return !(__x == __y); }
<span class="lineNum">    1296 </span>            : 
<span class="lineNum">    1297 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1298 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1299 </span>            :     inline bool
<span class="lineNum">    1300 </span>            :     operator&gt;(const _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __x,
<span class="lineNum">    1301 </span>            :               const _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __y)
<span class="lineNum">    1302 </span>            :     { return __y &lt; __x; }
<span class="lineNum">    1303 </span>            : 
<span class="lineNum">    1304 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1305 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1306 </span>            :     inline bool
<span class="lineNum">    1307 </span>            :     operator&lt;=(const _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __x,
<span class="lineNum">    1308 </span>            :                const _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __y)
<span class="lineNum">    1309 </span>            :     { return !(__y &lt; __x); }
<span class="lineNum">    1310 </span>            : 
<span class="lineNum">    1311 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1312 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1313 </span>            :     inline bool
<span class="lineNum">    1314 </span>            :     operator&gt;=(const _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __x,
<span class="lineNum">    1315 </span>            :                const _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __y)
<span class="lineNum">    1316 </span>            :     { return !(__x &lt; __y); }
<span class="lineNum">    1317 </span>            : 
<span class="lineNum">    1318 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1319 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1320 </span>            :     inline void
<span class="lineNum">    1321 </span>            :     swap(_Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __x,
<span class="lineNum">    1322 </span>            :          _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __y)
<span class="lineNum">    1323 </span>            :     { __x.swap(__y); }
<span class="lineNum">    1324 </span>            : 
<span class="lineNum">    1325 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">    1326 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1327 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1328 </span>            :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    1329 </span>            :     _Rb_tree(_Rb_tree&amp;&amp; __x, _Node_allocator&amp;&amp; __a)
<span class="lineNum">    1330 </span>            :     : _M_impl(__x._M_impl._M_key_compare, std::move(__a))
<span class="lineNum">    1331 </span>            :     {
<span class="lineNum">    1332 </span>            :       using __eq = integral_constant&lt;bool, _Alloc_traits::_S_always_equal()&gt;;
<span class="lineNum">    1333 </span>            :       if (__x._M_root() != nullptr)
<span class="lineNum">    1334 </span>            :         _M_move_data(__x, __eq());
<span class="lineNum">    1335 </span>            :     }
<span class="lineNum">    1336 </span>            : 
<span class="lineNum">    1337 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1338 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1339 </span>            :     void
<span class="lineNum">    1340 </span>            :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    1341 </span>            :     _M_move_data(_Rb_tree&amp; __x, std::true_type)
<span class="lineNum">    1342 </span>            :     {
<span class="lineNum">    1343 </span>            :       _M_root() = __x._M_root();
<span class="lineNum">    1344 </span>            :       _M_leftmost() = __x._M_leftmost();
<span class="lineNum">    1345 </span>            :       _M_rightmost() = __x._M_rightmost();
<span class="lineNum">    1346 </span>            :       _M_root()-&gt;_M_parent = _M_end();
<span class="lineNum">    1347 </span>            : 
<span class="lineNum">    1348 </span>            :       __x._M_root() = 0;
<span class="lineNum">    1349 </span>            :       __x._M_leftmost() = __x._M_end();
<span class="lineNum">    1350 </span>            :       __x._M_rightmost() = __x._M_end();
<span class="lineNum">    1351 </span>            : 
<span class="lineNum">    1352 </span>            :       this-&gt;_M_impl._M_node_count = __x._M_impl._M_node_count;
<span class="lineNum">    1353 </span>            :       __x._M_impl._M_node_count = 0;
<span class="lineNum">    1354 </span>            :     }
<span class="lineNum">    1355 </span>            : 
<span class="lineNum">    1356 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1357 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1358 </span>            :     void
<span class="lineNum">    1359 </span>            :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    1360 </span>            :     _M_move_data(_Rb_tree&amp; __x, std::false_type)
<span class="lineNum">    1361 </span>            :     {
<span class="lineNum">    1362 </span>            :       if (_M_get_Node_allocator() == __x._M_get_Node_allocator())
<span class="lineNum">    1363 </span>            :           _M_move_data(__x, std::true_type());
<span class="lineNum">    1364 </span>            :       else
<span class="lineNum">    1365 </span>            :         {
<span class="lineNum">    1366 </span>            :           _Alloc_node __an(*this);
<span class="lineNum">    1367 </span>            :           auto __lbd =
<span class="lineNum">    1368 </span>            :             [&amp;__an](const value_type&amp; __cval)
<span class="lineNum">    1369 </span>            :             {
<span class="lineNum">    1370 </span>            :               auto&amp; __val = const_cast&lt;value_type&amp;&gt;(__cval);
<span class="lineNum">    1371 </span>            :               return __an(std::move_if_noexcept(__val));
<span class="lineNum">    1372 </span>            :             };
<span class="lineNum">    1373 </span>            :           _M_root() = _M_copy(__x._M_begin(), _M_end(), __lbd);
<span class="lineNum">    1374 </span>            :           _M_leftmost() = _S_minimum(_M_root());
<span class="lineNum">    1375 </span>            :           _M_rightmost() = _S_maximum(_M_root());
<span class="lineNum">    1376 </span>            :           _M_impl._M_node_count = __x._M_impl._M_node_count;
<span class="lineNum">    1377 </span>            :         }
<span class="lineNum">    1378 </span>            :     }
<span class="lineNum">    1379 </span>            : 
<span class="lineNum">    1380 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1381 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1382 </span>            :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp;
<span class="lineNum">    1383 </span>            :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    1384 </span>            :     operator=(_Rb_tree&amp;&amp; __x)
<span class="lineNum">    1385 </span>            :     noexcept(_Alloc_traits::_S_nothrow_move())
<span class="lineNum">    1386 </span>            :     {
<span class="lineNum">    1387 </span>            :       _M_impl._M_key_compare = __x._M_impl._M_key_compare;
<span class="lineNum">    1388 </span>            :       if (_Alloc_traits::_S_propagate_on_move_assign()
<span class="lineNum">    1389 </span>            :           || _Alloc_traits::_S_always_equal()
<span class="lineNum">    1390 </span>            :           || _M_get_Node_allocator() == __x._M_get_Node_allocator())
<span class="lineNum">    1391 </span>            :         {
<span class="lineNum">    1392 </span>            :           clear();
<span class="lineNum">    1393 </span>            :           if (__x._M_root() != nullptr)
<span class="lineNum">    1394 </span>            :             _M_move_data(__x, std::true_type());
<span class="lineNum">    1395 </span>            :           std::__alloc_on_move(_M_get_Node_allocator(),
<span class="lineNum">    1396 </span>            :                                __x._M_get_Node_allocator());
<span class="lineNum">    1397 </span>            :           return *this;
<span class="lineNum">    1398 </span>            :         }
<span class="lineNum">    1399 </span>            : 
<span class="lineNum">    1400 </span>            :       // Try to move each node reusing existing nodes and copying __x nodes
<span class="lineNum">    1401 </span>            :       // structure.
<span class="lineNum">    1402 </span>            :       _Reuse_or_alloc_node __roan(*this);
<span class="lineNum">    1403 </span>            :       _M_impl._M_reset();
<span class="lineNum">    1404 </span>            :       if (__x._M_root() != nullptr)
<span class="lineNum">    1405 </span>            :         {
<span class="lineNum">    1406 </span>            :           auto __lbd =
<span class="lineNum">    1407 </span>            :             [&amp;__roan](const value_type&amp; __cval)
<span class="lineNum">    1408 </span>            :             {
<span class="lineNum">    1409 </span>            :               auto&amp; __val = const_cast&lt;value_type&amp;&gt;(__cval);
<span class="lineNum">    1410 </span>            :               return __roan(std::move_if_noexcept(__val));
<span class="lineNum">    1411 </span>            :             };
<span class="lineNum">    1412 </span>            :           _M_root() = _M_copy(__x._M_begin(), _M_end(), __lbd);
<span class="lineNum">    1413 </span>            :           _M_leftmost() = _S_minimum(_M_root());
<span class="lineNum">    1414 </span>            :           _M_rightmost() = _S_maximum(_M_root());
<span class="lineNum">    1415 </span>            :           _M_impl._M_node_count = __x._M_impl._M_node_count;
<span class="lineNum">    1416 </span>            :           __x.clear();
<span class="lineNum">    1417 </span>            :         }
<span class="lineNum">    1418 </span>            :       return *this;
<span class="lineNum">    1419 </span>            :     }
<span class="lineNum">    1420 </span>            : 
<span class="lineNum">    1421 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1422 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1423 </span>            :     template&lt;typename _Iterator&gt;
<span class="lineNum">    1424 </span>            :       void
<span class="lineNum">    1425 </span>            :       _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    1426 </span>            :       _M_assign_unique(_Iterator __first, _Iterator __last)
<span class="lineNum">    1427 </span>            :       {
<span class="lineNum">    1428 </span>            :         _Reuse_or_alloc_node __roan(*this);
<span class="lineNum">    1429 </span>            :         _M_impl._M_reset();
<span class="lineNum">    1430 </span>            :         for (; __first != __last; ++__first)
<span class="lineNum">    1431 </span>            :           _M_insert_unique_(end(), *__first, __roan);
<span class="lineNum">    1432 </span>            :       }
<span class="lineNum">    1433 </span>            : 
<span class="lineNum">    1434 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1435 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1436 </span>            :     template&lt;typename _Iterator&gt;
<span class="lineNum">    1437 </span>            :       void
<span class="lineNum">    1438 </span>            :       _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    1439 </span>            :       _M_assign_equal(_Iterator __first, _Iterator __last)
<span class="lineNum">    1440 </span>            :       {
<span class="lineNum">    1441 </span>            :         _Reuse_or_alloc_node __roan(*this);
<span class="lineNum">    1442 </span>            :         _M_impl._M_reset();
<span class="lineNum">    1443 </span>            :         for (; __first != __last; ++__first)
<span class="lineNum">    1444 </span>            :           _M_insert_equal_(end(), *__first, __roan);
<span class="lineNum">    1445 </span>            :       }
<span class="lineNum">    1446 </span>            : #endif
<span class="lineNum">    1447 </span>            : 
<span class="lineNum">    1448 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<a name="1449"><span class="lineNum">    1449 </span>            :            typename _Compare, typename _Alloc&gt;</a>
<span class="lineNum">    1450 </span>            :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp;
<span class="lineNum">    1451 </span><span class="lineNoCov">          0 :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::</span>
<span class="lineNum">    1452 </span>            :     operator=(const _Rb_tree&amp; __x)
<span class="lineNum">    1453 </span>            :     {
<span class="lineNum">    1454 </span><span class="lineNoCov">          0 :       if (this != &amp;__x)</span>
<span class="lineNum">    1455 </span>            :         {
<span class="lineNum">    1456 </span>            :           // Note that _Key may be a constant type.
<span class="lineNum">    1457 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">    1458 </span>            :           if (_Alloc_traits::_S_propagate_on_copy_assign())
<span class="lineNum">    1459 </span>            :             {
<span class="lineNum">    1460 </span>            :               auto&amp; __this_alloc = this-&gt;_M_get_Node_allocator();
<span class="lineNum">    1461 </span>            :               auto&amp; __that_alloc = __x._M_get_Node_allocator();
<span class="lineNum">    1462 </span>            :               if (!_Alloc_traits::_S_always_equal()
<span class="lineNum">    1463 </span>            :                   &amp;&amp; __this_alloc != __that_alloc)
<span class="lineNum">    1464 </span>            :                 {
<span class="lineNum">    1465 </span>            :                   // Replacement allocator cannot free existing storage, we need
<span class="lineNum">    1466 </span>            :                   // to erase nodes first.
<span class="lineNum">    1467 </span>            :                   clear();
<span class="lineNum">    1468 </span>            :                   std::__alloc_on_copy(__this_alloc, __that_alloc);
<span class="lineNum">    1469 </span>            :                 }
<span class="lineNum">    1470 </span>            :             }
<span class="lineNum">    1471 </span>            : #endif
<span class="lineNum">    1472 </span>            : 
<span class="lineNum">    1473 </span>            :           _Reuse_or_alloc_node __roan(*this);
<span class="lineNum">    1474 </span>            :           _M_impl._M_reset();
<span class="lineNum">    1475 </span>            :           _M_impl._M_key_compare = __x._M_impl._M_key_compare;
<span class="lineNum">    1476 </span><span class="lineNoCov">          0 :           if (__x._M_root() != 0)</span>
<span class="lineNum">    1477 </span>            :             {
<span class="lineNum">    1478 </span><span class="lineNoCov">          0 :               _M_root() = _M_copy(__x._M_begin(), _M_end(), __roan);</span>
<span class="lineNum">    1479 </span><span class="lineNoCov">          0 :               _M_leftmost() = _S_minimum(_M_root());</span>
<span class="lineNum">    1480 </span><span class="lineNoCov">          0 :               _M_rightmost() = _S_maximum(_M_root());</span>
<span class="lineNum">    1481 </span><span class="lineNoCov">          0 :               _M_impl._M_node_count = __x._M_impl._M_node_count;</span>
<span class="lineNum">    1482 </span>            :             }
<span class="lineNum">    1483 </span>            :         }
<span class="lineNum">    1484 </span>            : 
<span class="lineNum">    1485 </span><span class="lineNoCov">          0 :       return *this;</span>
<span class="lineNum">    1486 </span>            :     }
<span class="lineNum">    1487 </span>            : 
<span class="lineNum">    1488 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1489 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1490 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">    1491 </span>            :     template&lt;typename _Arg, typename _NodeGen&gt;
<span class="lineNum">    1492 </span>            : #else
<span class="lineNum">    1493 </span>            :     template&lt;typename _NodeGen&gt;
<a name="1494"><span class="lineNum">    1494 </span>            : #endif</a>
<span class="lineNum">    1495 </span>            :       typename _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::iterator
<span class="lineNum">    1496 </span><span class="lineCov">        252 :       _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::</span>
<span class="lineNum">    1497 </span>            :       _M_insert_(_Base_ptr __x, _Base_ptr __p,
<span class="lineNum">    1498 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">    1499 </span>            :                  _Arg&amp;&amp; __v,
<span class="lineNum">    1500 </span>            : #else
<span class="lineNum">    1501 </span>            :                  const _Val&amp; __v,
<span class="lineNum">    1502 </span>            : #endif
<span class="lineNum">    1503 </span>            :                  _NodeGen&amp; __node_gen)
<span class="lineNum">    1504 </span>            :       {
<span class="lineNum">    1505 </span>            :         bool __insert_left = (__x != 0 || __p == _M_end()
<span class="lineNum">    1506 </span>            :                               || _M_impl._M_key_compare(_KeyOfValue()(__v),
<span class="lineNum">    1507 </span><span class="lineCov">        674 :                                                         _S_key(__p)));</span>
<span class="lineNum">    1508 </span>            : 
<span class="lineNum">    1509 </span>            :         _Link_type __z = __node_gen(_GLIBCXX_FORWARD(_Arg, __v));
<span class="lineNum">    1510 </span>            : 
<span class="lineNum">    1511 </span><span class="lineCov">        252 :         _Rb_tree_insert_and_rebalance(__insert_left, __z, __p,</span>
<span class="lineNum">    1512 </span>            :                                       this-&gt;_M_impl._M_header);
<span class="lineNum">    1513 </span><span class="lineCov">        252 :         ++_M_impl._M_node_count;</span>
<span class="lineNum">    1514 </span><span class="lineCov">        252 :         return iterator(__z);</span>
<span class="lineNum">    1515 </span>            :       }
<span class="lineNum">    1516 </span>            : 
<span class="lineNum">    1517 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1518 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1519 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">    1520 </span>            :     template&lt;typename _Arg&gt;
<span class="lineNum">    1521 </span>            : #endif
<span class="lineNum">    1522 </span>            :     typename _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::iterator
<span class="lineNum">    1523 </span>            :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    1524 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">    1525 </span>            :     _M_insert_lower(_Base_ptr __p, _Arg&amp;&amp; __v)
<span class="lineNum">    1526 </span>            : #else
<span class="lineNum">    1527 </span>            :     _M_insert_lower(_Base_ptr __p, const _Val&amp; __v)
<span class="lineNum">    1528 </span>            : #endif
<span class="lineNum">    1529 </span>            :     {
<span class="lineNum">    1530 </span>            :       bool __insert_left = (__p == _M_end()
<span class="lineNum">    1531 </span>            :                             || !_M_impl._M_key_compare(_S_key(__p),
<span class="lineNum">    1532 </span>            :                                                        _KeyOfValue()(__v)));
<span class="lineNum">    1533 </span>            : 
<span class="lineNum">    1534 </span>            :       _Link_type __z = _M_create_node(_GLIBCXX_FORWARD(_Arg, __v));
<span class="lineNum">    1535 </span>            : 
<span class="lineNum">    1536 </span>            :       _Rb_tree_insert_and_rebalance(__insert_left, __z, __p,
<span class="lineNum">    1537 </span>            :                                     this-&gt;_M_impl._M_header);
<span class="lineNum">    1538 </span>            :       ++_M_impl._M_node_count;
<span class="lineNum">    1539 </span>            :       return iterator(__z);
<span class="lineNum">    1540 </span>            :     }
<span class="lineNum">    1541 </span>            : 
<span class="lineNum">    1542 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1543 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1544 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">    1545 </span>            :     template&lt;typename _Arg&gt;
<span class="lineNum">    1546 </span>            : #endif
<span class="lineNum">    1547 </span>            :     typename _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::iterator
<span class="lineNum">    1548 </span>            :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    1549 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">    1550 </span>            :     _M_insert_equal_lower(_Arg&amp;&amp; __v)
<span class="lineNum">    1551 </span>            : #else
<span class="lineNum">    1552 </span>            :     _M_insert_equal_lower(const _Val&amp; __v)
<span class="lineNum">    1553 </span>            : #endif
<span class="lineNum">    1554 </span>            :     {
<span class="lineNum">    1555 </span>            :       _Link_type __x = _M_begin();
<span class="lineNum">    1556 </span>            :       _Link_type __y = _M_end();
<span class="lineNum">    1557 </span>            :       while (__x != 0)
<span class="lineNum">    1558 </span>            :         {
<span class="lineNum">    1559 </span>            :           __y = __x;
<span class="lineNum">    1560 </span>            :           __x = !_M_impl._M_key_compare(_S_key(__x), _KeyOfValue()(__v)) ?
<span class="lineNum">    1561 </span>            :                 _S_left(__x) : _S_right(__x);
<span class="lineNum">    1562 </span>            :         }
<span class="lineNum">    1563 </span>            :       return _M_insert_lower(__y, _GLIBCXX_FORWARD(_Arg, __v));
<span class="lineNum">    1564 </span>            :     }
<span class="lineNum">    1565 </span>            : 
<span class="lineNum">    1566 </span>            :   template&lt;typename _Key, typename _Val, typename _KoV,
<span class="lineNum">    1567 </span>            :            typename _Compare, typename _Alloc&gt;
<a name="1568"><span class="lineNum">    1568 </span>            :     template&lt;typename _NodeGen&gt;</a>
<span class="lineNum">    1569 </span>            :       typename _Rb_tree&lt;_Key, _Val, _KoV, _Compare, _Alloc&gt;::_Link_type
<span class="lineNum">    1570 </span><span class="lineNoCov">          0 :       _Rb_tree&lt;_Key, _Val, _KoV, _Compare, _Alloc&gt;::</span>
<span class="lineNum">    1571 </span>            :       _M_copy(_Const_Link_type __x, _Link_type __p, _NodeGen&amp; __node_gen)
<span class="lineNum">    1572 </span>            :       {
<span class="lineNum">    1573 </span>            :         // Structural copy. __x and __p must be non-null.
<span class="lineNum">    1574 </span>            :         _Link_type __top = _M_clone_node(__x, __node_gen);
<span class="lineNum">    1575 </span><span class="lineNoCov">          0 :         __top-&gt;_M_parent = __p;</span>
<span class="lineNum">    1576 </span>            : 
<span class="lineNum">    1577 </span>            :         __try
<span class="lineNum">    1578 </span>            :           {
<span class="lineNum">    1579 </span><span class="lineNoCov">          0 :             if (__x-&gt;_M_right)</span>
<span class="lineNum">    1580 </span><span class="lineNoCov">          0 :               __top-&gt;_M_right = _M_copy(_S_right(__x), __top, __node_gen);</span>
<span class="lineNum">    1581 </span>            :             __p = __top;
<span class="lineNum">    1582 </span>            :             __x = _S_left(__x);
<span class="lineNum">    1583 </span>            : 
<span class="lineNum">    1584 </span><span class="lineNoCov">          0 :             while (__x != 0)</span>
<span class="lineNum">    1585 </span>            :               {
<span class="lineNum">    1586 </span>            :                 _Link_type __y = _M_clone_node(__x, __node_gen);
<span class="lineNum">    1587 </span><span class="lineNoCov">          0 :                 __p-&gt;_M_left = __y;</span>
<span class="lineNum">    1588 </span><span class="lineNoCov">          0 :                 __y-&gt;_M_parent = __p;</span>
<span class="lineNum">    1589 </span><span class="lineNoCov">          0 :                 if (__x-&gt;_M_right)</span>
<span class="lineNum">    1590 </span><span class="lineNoCov">          0 :                   __y-&gt;_M_right = _M_copy(_S_right(__x), __y, __node_gen);</span>
<span class="lineNum">    1591 </span>            :                 __p = __y;
<span class="lineNum">    1592 </span>            :                 __x = _S_left(__x);
<span class="lineNum">    1593 </span>            :               }
<span class="lineNum">    1594 </span>            :           }
<span class="lineNum">    1595 </span><span class="lineNoCov">          0 :         __catch(...)</span>
<span class="lineNum">    1596 </span>            :           {
<span class="lineNum">    1597 </span><span class="lineNoCov">          0 :             _M_erase(__top);</span>
<span class="lineNum">    1598 </span><span class="lineNoCov">          0 :             __throw_exception_again;</span>
<span class="lineNum">    1599 </span>            :           }
<span class="lineNum">    1600 </span><span class="lineNoCov">          0 :         return __top;</span>
<span class="lineNum">    1601 </span>            :       }
<span class="lineNum">    1602 </span>            : 
<span class="lineNum">    1603 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<a name="1604"><span class="lineNum">    1604 </span>            :            typename _Compare, typename _Alloc&gt;</a>
<span class="lineNum">    1605 </span>            :     void
<span class="lineNum">    1606 </span><span class="lineCov">        116 :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::</span>
<span class="lineNum">    1607 </span>            :     _M_erase(_Link_type __x)
<span class="lineNum">    1608 </span>            :     {
<span class="lineNum">    1609 </span>            :       // Erase without rebalancing.
<span class="lineNum">    1610 </span><span class="lineCov">        322 :       while (__x != 0)</span>
<span class="lineNum">    1611 </span>            :         {
<span class="lineNum">    1612 </span><span class="lineCov">        103 :           _M_erase(_S_right(__x));</span>
<span class="lineNum">    1613 </span>            :           _Link_type __y = _S_left(__x);
<span class="lineNum">    1614 </span><span class="lineCov">         77 :           _M_drop_node(__x);</span>
<span class="lineNum">    1615 </span>            :           __x = __y;
<span class="lineNum">    1616 </span>            :         }
<span class="lineNum">    1617 </span><span class="lineCov">        116 :     }</span>
<span class="lineNum">    1618 </span>            : 
<span class="lineNum">    1619 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1620 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1621 </span>            :     typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,
<span class="lineNum">    1622 </span>            :                       _Compare, _Alloc&gt;::iterator
<span class="lineNum">    1623 </span>            :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    1624 </span>            :     _M_lower_bound(_Link_type __x, _Link_type __y,
<span class="lineNum">    1625 </span>            :                    const _Key&amp; __k)
<span class="lineNum">    1626 </span>            :     {
<span class="lineNum">    1627 </span><span class="lineCov">       1886 :       while (__x != 0)</span>
<span class="lineNum">    1628 </span><span class="lineCov">       1498 :         if (!_M_impl._M_key_compare(_S_key(__x), __k))</span>
<span class="lineNum">    1629 </span>            :           __y = __x, __x = _S_left(__x);
<span class="lineNum">    1630 </span>            :         else
<span class="lineNum">    1631 </span>            :           __x = _S_right(__x);
<span class="lineNum">    1632 </span>            :       return iterator(__y);
<span class="lineNum">    1633 </span>            :     }
<span class="lineNum">    1634 </span>            : 
<span class="lineNum">    1635 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1636 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1637 </span>            :     typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,
<span class="lineNum">    1638 </span>            :                       _Compare, _Alloc&gt;::const_iterator
<span class="lineNum">    1639 </span>            :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    1640 </span>            :     _M_lower_bound(_Const_Link_type __x, _Const_Link_type __y,
<span class="lineNum">    1641 </span>            :                    const _Key&amp; __k) const
<span class="lineNum">    1642 </span>            :     {
<span class="lineNum">    1643 </span><span class="lineCov">       1000 :       while (__x != 0)</span>
<span class="lineNum">    1644 </span><span class="lineCov">        854 :         if (!_M_impl._M_key_compare(_S_key(__x), __k))</span>
<span class="lineNum">    1645 </span>            :           __y = __x, __x = _S_left(__x);
<span class="lineNum">    1646 </span>            :         else
<span class="lineNum">    1647 </span>            :           __x = _S_right(__x);
<span class="lineNum">    1648 </span>            :       return const_iterator(__y);
<span class="lineNum">    1649 </span>            :     }
<span class="lineNum">    1650 </span>            : 
<span class="lineNum">    1651 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1652 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1653 </span>            :     typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,
<span class="lineNum">    1654 </span>            :                       _Compare, _Alloc&gt;::iterator
<span class="lineNum">    1655 </span>            :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    1656 </span>            :     _M_upper_bound(_Link_type __x, _Link_type __y,
<span class="lineNum">    1657 </span>            :                    const _Key&amp; __k)
<span class="lineNum">    1658 </span>            :     {
<span class="lineNum">    1659 </span><span class="lineCov">         16 :       while (__x != 0)</span>
<span class="lineNum">    1660 </span><span class="lineCov">          3 :         if (_M_impl._M_key_compare(__k, _S_key(__x)))</span>
<span class="lineNum">    1661 </span>            :           __y = __x, __x = _S_left(__x);
<span class="lineNum">    1662 </span>            :         else
<span class="lineNum">    1663 </span>            :           __x = _S_right(__x);
<span class="lineNum">    1664 </span>            :       return iterator(__y);
<span class="lineNum">    1665 </span>            :     }
<span class="lineNum">    1666 </span>            : 
<span class="lineNum">    1667 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1668 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1669 </span>            :     typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,
<span class="lineNum">    1670 </span>            :                       _Compare, _Alloc&gt;::const_iterator
<span class="lineNum">    1671 </span>            :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    1672 </span>            :     _M_upper_bound(_Const_Link_type __x, _Const_Link_type __y,
<span class="lineNum">    1673 </span>            :                    const _Key&amp; __k) const
<span class="lineNum">    1674 </span>            :     {
<span class="lineNum">    1675 </span>            :       while (__x != 0)
<span class="lineNum">    1676 </span>            :         if (_M_impl._M_key_compare(__k, _S_key(__x)))
<span class="lineNum">    1677 </span>            :           __y = __x, __x = _S_left(__x);
<span class="lineNum">    1678 </span>            :         else
<span class="lineNum">    1679 </span>            :           __x = _S_right(__x);
<span class="lineNum">    1680 </span>            :       return const_iterator(__y);
<span class="lineNum">    1681 </span>            :     }
<span class="lineNum">    1682 </span>            : 
<span class="lineNum">    1683 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1684 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1685 </span>            :     pair&lt;typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,
<span class="lineNum">    1686 </span>            :                            _Compare, _Alloc&gt;::iterator,
<a name="1687"><span class="lineNum">    1687 </span>            :          typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,</a>
<span class="lineNum">    1688 </span>            :                            _Compare, _Alloc&gt;::iterator&gt;
<span class="lineNum">    1689 </span><span class="lineCov">         13 :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::</span>
<span class="lineNum">    1690 </span>            :     equal_range(const _Key&amp; __k)
<span class="lineNum">    1691 </span>            :     {
<span class="lineNum">    1692 </span>            :       _Link_type __x = _M_begin();
<span class="lineNum">    1693 </span>            :       _Link_type __y = _M_end();
<span class="lineNum">    1694 </span><span class="lineCov">         23 :       while (__x != 0)</span>
<span class="lineNum">    1695 </span>            :         {
<span class="lineNum">    1696 </span><span class="lineCov">         23 :           if (_M_impl._M_key_compare(_S_key(__x), __k))</span>
<span class="lineNum">    1697 </span>            :             __x = _S_right(__x);
<span class="lineNum">    1698 </span><span class="lineCov">         20 :           else if (_M_impl._M_key_compare(__k, _S_key(__x)))</span>
<span class="lineNum">    1699 </span>            :             __y = __x, __x = _S_left(__x);
<span class="lineNum">    1700 </span>            :           else
<span class="lineNum">    1701 </span>            :             {
<span class="lineNum">    1702 </span>            :               _Link_type __xu(__x), __yu(__y);
<span class="lineNum">    1703 </span>            :               __y = __x, __x = _S_left(__x);
<span class="lineNum">    1704 </span>            :               __xu = _S_right(__xu);
<span class="lineNum">    1705 </span>            :               return pair&lt;iterator,
<span class="lineNum">    1706 </span>            :                           iterator&gt;(_M_lower_bound(__x, __y, __k),
<span class="lineNum">    1707 </span><span class="lineCov">         13 :                                     _M_upper_bound(__xu, __yu, __k));</span>
<span class="lineNum">    1708 </span>            :             }
<span class="lineNum">    1709 </span>            :         }
<span class="lineNum">    1710 </span>            :       return pair&lt;iterator, iterator&gt;(iterator(__y),
<span class="lineNum">    1711 </span><span class="lineNoCov">          0 :                                       iterator(__y));</span>
<span class="lineNum">    1712 </span>            :     }
<span class="lineNum">    1713 </span>            : 
<span class="lineNum">    1714 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1715 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1716 </span>            :     pair&lt;typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,
<span class="lineNum">    1717 </span>            :                            _Compare, _Alloc&gt;::const_iterator,
<span class="lineNum">    1718 </span>            :          typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,
<span class="lineNum">    1719 </span>            :                            _Compare, _Alloc&gt;::const_iterator&gt;
<span class="lineNum">    1720 </span>            :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    1721 </span>            :     equal_range(const _Key&amp; __k) const
<span class="lineNum">    1722 </span>            :     {
<span class="lineNum">    1723 </span>            :       _Const_Link_type __x = _M_begin();
<span class="lineNum">    1724 </span>            :       _Const_Link_type __y = _M_end();
<span class="lineNum">    1725 </span>            :       while (__x != 0)
<span class="lineNum">    1726 </span>            :         {
<span class="lineNum">    1727 </span>            :           if (_M_impl._M_key_compare(_S_key(__x), __k))
<span class="lineNum">    1728 </span>            :             __x = _S_right(__x);
<span class="lineNum">    1729 </span>            :           else if (_M_impl._M_key_compare(__k, _S_key(__x)))
<span class="lineNum">    1730 </span>            :             __y = __x, __x = _S_left(__x);
<span class="lineNum">    1731 </span>            :           else
<span class="lineNum">    1732 </span>            :             {
<span class="lineNum">    1733 </span>            :               _Const_Link_type __xu(__x), __yu(__y);
<span class="lineNum">    1734 </span>            :               __y = __x, __x = _S_left(__x);
<span class="lineNum">    1735 </span>            :               __xu = _S_right(__xu);
<span class="lineNum">    1736 </span>            :               return pair&lt;const_iterator,
<span class="lineNum">    1737 </span>            :                           const_iterator&gt;(_M_lower_bound(__x, __y, __k),
<span class="lineNum">    1738 </span>            :                                           _M_upper_bound(__xu, __yu, __k));
<span class="lineNum">    1739 </span>            :             }
<span class="lineNum">    1740 </span>            :         }
<span class="lineNum">    1741 </span>            :       return pair&lt;const_iterator, const_iterator&gt;(const_iterator(__y),
<span class="lineNum">    1742 </span>            :                                                   const_iterator(__y));
<span class="lineNum">    1743 </span>            :     }
<span class="lineNum">    1744 </span>            : 
<span class="lineNum">    1745 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1746 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1747 </span>            :     void
<span class="lineNum">    1748 </span>            :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    1749 </span>            :     swap(_Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;&amp; __t)
<span class="lineNum">    1750 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">    1751 </span>            :     noexcept(_Alloc_traits::_S_nothrow_swap())
<span class="lineNum">    1752 </span>            : #endif
<span class="lineNum">    1753 </span>            :     {
<span class="lineNum">    1754 </span>            :       if (_M_root() == 0)
<span class="lineNum">    1755 </span>            :         {
<span class="lineNum">    1756 </span>            :           if (__t._M_root() != 0)
<span class="lineNum">    1757 </span>            :             {
<span class="lineNum">    1758 </span>            :               _M_root() = __t._M_root();
<span class="lineNum">    1759 </span>            :               _M_leftmost() = __t._M_leftmost();
<span class="lineNum">    1760 </span>            :               _M_rightmost() = __t._M_rightmost();
<span class="lineNum">    1761 </span>            :               _M_root()-&gt;_M_parent = _M_end();
<span class="lineNum">    1762 </span>            :               _M_impl._M_node_count = __t._M_impl._M_node_count;
<span class="lineNum">    1763 </span>            :               
<span class="lineNum">    1764 </span>            :               __t._M_impl._M_reset();
<span class="lineNum">    1765 </span>            :             }
<span class="lineNum">    1766 </span>            :         }
<span class="lineNum">    1767 </span>            :       else if (__t._M_root() == 0)
<span class="lineNum">    1768 </span>            :         {
<span class="lineNum">    1769 </span>            :           __t._M_root() = _M_root();
<span class="lineNum">    1770 </span>            :           __t._M_leftmost() = _M_leftmost();
<span class="lineNum">    1771 </span>            :           __t._M_rightmost() = _M_rightmost();
<span class="lineNum">    1772 </span>            :           __t._M_root()-&gt;_M_parent = __t._M_end();
<span class="lineNum">    1773 </span>            :           __t._M_impl._M_node_count = _M_impl._M_node_count;
<span class="lineNum">    1774 </span>            :           
<span class="lineNum">    1775 </span>            :           _M_impl._M_reset();
<span class="lineNum">    1776 </span>            :         }
<span class="lineNum">    1777 </span>            :       else
<span class="lineNum">    1778 </span>            :         {
<span class="lineNum">    1779 </span>            :           std::swap(_M_root(),__t._M_root());
<span class="lineNum">    1780 </span>            :           std::swap(_M_leftmost(),__t._M_leftmost());
<span class="lineNum">    1781 </span>            :           std::swap(_M_rightmost(),__t._M_rightmost());
<span class="lineNum">    1782 </span>            :           
<span class="lineNum">    1783 </span>            :           _M_root()-&gt;_M_parent = _M_end();
<span class="lineNum">    1784 </span>            :           __t._M_root()-&gt;_M_parent = __t._M_end();
<span class="lineNum">    1785 </span>            :           std::swap(this-&gt;_M_impl._M_node_count, __t._M_impl._M_node_count);
<span class="lineNum">    1786 </span>            :         }
<span class="lineNum">    1787 </span>            :       // No need to swap header's color as it does not change.
<span class="lineNum">    1788 </span>            :       std::swap(this-&gt;_M_impl._M_key_compare, __t._M_impl._M_key_compare);
<span class="lineNum">    1789 </span>            : 
<span class="lineNum">    1790 </span>            :       _Alloc_traits::_S_on_swap(_M_get_Node_allocator(),
<span class="lineNum">    1791 </span>            :                                 __t._M_get_Node_allocator());
<span class="lineNum">    1792 </span>            :     }
<span class="lineNum">    1793 </span>            : 
<span class="lineNum">    1794 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1795 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1796 </span>            :     pair&lt;typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,
<span class="lineNum">    1797 </span>            :                            _Compare, _Alloc&gt;::_Base_ptr,
<a name="1798"><span class="lineNum">    1798 </span>            :          typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,</a>
<span class="lineNum">    1799 </span>            :                            _Compare, _Alloc&gt;::_Base_ptr&gt;
<span class="lineNum">    1800 </span><span class="lineCov">         45 :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::</span>
<span class="lineNum">    1801 </span>            :     _M_get_insert_unique_pos(const key_type&amp; __k)
<span class="lineNum">    1802 </span>            :     {
<span class="lineNum">    1803 </span>            :       typedef pair&lt;_Base_ptr, _Base_ptr&gt; _Res;
<span class="lineNum">    1804 </span>            :       _Link_type __x = _M_begin();
<span class="lineNum">    1805 </span>            :       _Link_type __y = _M_end();
<span class="lineNum">    1806 </span>            :       bool __comp = true;
<span class="lineNum">    1807 </span><span class="lineCov">         97 :       while (__x != 0)</span>
<span class="lineNum">    1808 </span>            :         {
<span class="lineNum">    1809 </span>            :           __y = __x;
<span class="lineNum">    1810 </span>            :           __comp = _M_impl._M_key_compare(__k, _S_key(__x));
<span class="lineNum">    1811 </span><span class="lineCov">         52 :           __x = __comp ? _S_left(__x) : _S_right(__x);</span>
<span class="lineNum">    1812 </span>            :         }
<span class="lineNum">    1813 </span>            :       iterator __j = iterator(__y);
<span class="lineNum">    1814 </span><span class="lineCov">         45 :       if (__comp)</span>
<span class="lineNum">    1815 </span>            :         {
<span class="lineNum">    1816 </span><span class="lineCov">         32 :           if (__j == begin())</span>
<span class="lineNum">    1817 </span><span class="lineCov">         30 :             return _Res(__x, __y);</span>
<span class="lineNum">    1818 </span>            :           else
<span class="lineNum">    1819 </span>            :             --__j;
<span class="lineNum">    1820 </span>            :         }
<span class="lineNum">    1821 </span><span class="lineCov">         15 :       if (_M_impl._M_key_compare(_S_key(__j._M_node), __k))</span>
<span class="lineNum">    1822 </span><span class="lineCov">         14 :         return _Res(__x, __y);</span>
<span class="lineNum">    1823 </span><span class="lineCov">          1 :       return _Res(__j._M_node, 0);</span>
<span class="lineNum">    1824 </span>            :     }
<span class="lineNum">    1825 </span>            : 
<span class="lineNum">    1826 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1827 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1828 </span>            :     pair&lt;typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,
<span class="lineNum">    1829 </span>            :                            _Compare, _Alloc&gt;::_Base_ptr,
<span class="lineNum">    1830 </span>            :          typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,
<span class="lineNum">    1831 </span>            :                            _Compare, _Alloc&gt;::_Base_ptr&gt;
<span class="lineNum">    1832 </span>            :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    1833 </span>            :     _M_get_insert_equal_pos(const key_type&amp; __k)
<span class="lineNum">    1834 </span>            :     {
<span class="lineNum">    1835 </span>            :       typedef pair&lt;_Base_ptr, _Base_ptr&gt; _Res;
<span class="lineNum">    1836 </span>            :       _Link_type __x = _M_begin();
<span class="lineNum">    1837 </span>            :       _Link_type __y = _M_end();
<span class="lineNum">    1838 </span>            :       while (__x != 0)
<span class="lineNum">    1839 </span>            :         {
<span class="lineNum">    1840 </span>            :           __y = __x;
<span class="lineNum">    1841 </span>            :           __x = _M_impl._M_key_compare(__k, _S_key(__x)) ?
<span class="lineNum">    1842 </span>            :                 _S_left(__x) : _S_right(__x);
<span class="lineNum">    1843 </span>            :         }
<span class="lineNum">    1844 </span>            :       return _Res(__x, __y);
<span class="lineNum">    1845 </span>            :     }
<span class="lineNum">    1846 </span>            : 
<span class="lineNum">    1847 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1848 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1849 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">    1850 </span>            :     template&lt;typename _Arg&gt;
<span class="lineNum">    1851 </span>            : #endif
<a name="1852"><span class="lineNum">    1852 </span>            :     pair&lt;typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,</a>
<span class="lineNum">    1853 </span>            :                            _Compare, _Alloc&gt;::iterator, bool&gt;
<span class="lineNum">    1854 </span><span class="lineCov">         31 :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::</span>
<span class="lineNum">    1855 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">    1856 </span>            :     _M_insert_unique(_Arg&amp;&amp; __v)
<span class="lineNum">    1857 </span>            : #else
<span class="lineNum">    1858 </span>            :     _M_insert_unique(const _Val&amp; __v)
<span class="lineNum">    1859 </span>            : #endif
<span class="lineNum">    1860 </span>            :     {
<span class="lineNum">    1861 </span>            :       typedef pair&lt;iterator, bool&gt; _Res;
<span class="lineNum">    1862 </span>            :       pair&lt;_Base_ptr, _Base_ptr&gt; __res
<span class="lineNum">    1863 </span><span class="lineCov">         31 :         = _M_get_insert_unique_pos(_KeyOfValue()(__v));</span>
<span class="lineNum">    1864 </span>            : 
<span class="lineNum">    1865 </span><span class="lineCov">         31 :       if (__res.second)</span>
<span class="lineNum">    1866 </span>            :         {
<span class="lineNum">    1867 </span>            :           _Alloc_node __an(*this);
<span class="lineNum">    1868 </span>            :           return _Res(_M_insert_(__res.first, __res.second,
<span class="lineNum">    1869 </span>            :                                  _GLIBCXX_FORWARD(_Arg, __v), __an),
<span class="lineNum">    1870 </span><span class="lineCov">         60 :                       true);</span>
<span class="lineNum">    1871 </span>            :         }
<span class="lineNum">    1872 </span>            : 
<span class="lineNum">    1873 </span><span class="lineCov">          1 :       return _Res(iterator(static_cast&lt;_Link_type&gt;(__res.first)), false);</span>
<span class="lineNum">    1874 </span>            :     }
<span class="lineNum">    1875 </span>            : 
<span class="lineNum">    1876 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1877 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1878 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">    1879 </span>            :     template&lt;typename _Arg&gt;
<span class="lineNum">    1880 </span>            : #endif
<span class="lineNum">    1881 </span>            :     typename _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::iterator
<span class="lineNum">    1882 </span>            :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    1883 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">    1884 </span>            :     _M_insert_equal(_Arg&amp;&amp; __v)
<span class="lineNum">    1885 </span>            : #else
<span class="lineNum">    1886 </span>            :     _M_insert_equal(const _Val&amp; __v)
<span class="lineNum">    1887 </span>            : #endif
<span class="lineNum">    1888 </span>            :     {
<span class="lineNum">    1889 </span>            :       pair&lt;_Base_ptr, _Base_ptr&gt; __res
<span class="lineNum">    1890 </span>            :         = _M_get_insert_equal_pos(_KeyOfValue()(__v));
<span class="lineNum">    1891 </span>            :       _Alloc_node __an(*this);
<span class="lineNum">    1892 </span>            :       return _M_insert_(__res.first, __res.second,
<span class="lineNum">    1893 </span>            :                         _GLIBCXX_FORWARD(_Arg, __v), __an);
<span class="lineNum">    1894 </span>            :     }
<span class="lineNum">    1895 </span>            : 
<span class="lineNum">    1896 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1897 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1898 </span>            :     pair&lt;typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,
<span class="lineNum">    1899 </span>            :                            _Compare, _Alloc&gt;::_Base_ptr,
<a name="1900"><span class="lineNum">    1900 </span>            :          typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,</a>
<span class="lineNum">    1901 </span>            :                            _Compare, _Alloc&gt;::_Base_ptr&gt;
<span class="lineNum">    1902 </span><span class="lineCov">        222 :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::</span>
<span class="lineNum">    1903 </span>            :     _M_get_insert_hint_unique_pos(const_iterator __position,
<span class="lineNum">    1904 </span>            :                                   const key_type&amp; __k)
<span class="lineNum">    1905 </span>            :     {
<span class="lineNum">    1906 </span>            :       iterator __pos = __position._M_const_cast();
<span class="lineNum">    1907 </span>            :       typedef pair&lt;_Base_ptr, _Base_ptr&gt; _Res;
<span class="lineNum">    1908 </span>            : 
<span class="lineNum">    1909 </span>            :       // end()
<span class="lineNum">    1910 </span><span class="lineCov">        222 :       if (__pos._M_node == _M_end())</span>
<span class="lineNum">    1911 </span>            :         {
<span class="lineNum">    1912 </span><span class="lineCov">        298 :           if (size() &gt; 0</span>
<span class="lineNum">    1913 </span><span class="lineCov">        142 :               &amp;&amp; _M_impl._M_key_compare(_S_key(_M_rightmost()), __k))</span>
<span class="lineNum">    1914 </span><span class="lineCov">        142 :             return _Res(0, _M_rightmost());</span>
<span class="lineNum">    1915 </span>            :           else
<span class="lineNum">    1916 </span><span class="lineCov">         14 :             return _M_get_insert_unique_pos(__k);</span>
<span class="lineNum">    1917 </span>            :         }
<span class="lineNum">    1918 </span><span class="lineCov">         66 :       else if (_M_impl._M_key_compare(__k, _S_key(__pos._M_node)))</span>
<span class="lineNum">    1919 </span>            :         {
<span class="lineNum">    1920 </span>            :           // First, try before...
<span class="lineNum">    1921 </span>            :           iterator __before = __pos;
<span class="lineNum">    1922 </span><span class="lineCov">         66 :           if (__pos._M_node == _M_leftmost()) // begin()</span>
<span class="lineNum">    1923 </span><span class="lineCov">         10 :             return _Res(_M_leftmost(), _M_leftmost());</span>
<span class="lineNum">    1924 </span><span class="lineCov">         56 :           else if (_M_impl._M_key_compare(_S_key((--__before)._M_node), __k))</span>
<span class="lineNum">    1925 </span>            :             {
<span class="lineNum">    1926 </span><span class="lineCov">         56 :               if (_S_right(__before._M_node) == 0)</span>
<span class="lineNum">    1927 </span><span class="lineCov">         38 :                 return _Res(0, __before._M_node);</span>
<span class="lineNum">    1928 </span>            :               else
<span class="lineNum">    1929 </span><span class="lineCov">         18 :                 return _Res(__pos._M_node, __pos._M_node);</span>
<span class="lineNum">    1930 </span>            :             }
<span class="lineNum">    1931 </span>            :           else
<span class="lineNum">    1932 </span><span class="lineNoCov">          0 :             return _M_get_insert_unique_pos(__k);</span>
<span class="lineNum">    1933 </span>            :         }
<span class="lineNum">    1934 </span><span class="lineNoCov">          0 :       else if (_M_impl._M_key_compare(_S_key(__pos._M_node), __k))</span>
<span class="lineNum">    1935 </span>            :         {
<span class="lineNum">    1936 </span>            :           // ... then try after.
<span class="lineNum">    1937 </span>            :           iterator __after = __pos;
<span class="lineNum">    1938 </span><span class="lineNoCov">          0 :           if (__pos._M_node == _M_rightmost())</span>
<span class="lineNum">    1939 </span><span class="lineNoCov">          0 :             return _Res(0, _M_rightmost());</span>
<span class="lineNum">    1940 </span><span class="lineNoCov">          0 :           else if (_M_impl._M_key_compare(__k, _S_key((++__after)._M_node)))</span>
<span class="lineNum">    1941 </span>            :             {
<span class="lineNum">    1942 </span><span class="lineNoCov">          0 :               if (_S_right(__pos._M_node) == 0)</span>
<span class="lineNum">    1943 </span><span class="lineNoCov">          0 :                 return _Res(0, __pos._M_node);</span>
<span class="lineNum">    1944 </span>            :               else
<span class="lineNum">    1945 </span><span class="lineNoCov">          0 :                 return _Res(__after._M_node, __after._M_node);</span>
<span class="lineNum">    1946 </span>            :             }
<span class="lineNum">    1947 </span>            :           else
<span class="lineNum">    1948 </span><span class="lineNoCov">          0 :             return _M_get_insert_unique_pos(__k);</span>
<span class="lineNum">    1949 </span>            :         }
<span class="lineNum">    1950 </span>            :       else
<span class="lineNum">    1951 </span>            :         // Equivalent keys.
<span class="lineNum">    1952 </span><span class="lineNoCov">          0 :         return _Res(__pos._M_node, 0);</span>
<span class="lineNum">    1953 </span>            :     }
<span class="lineNum">    1954 </span>            : 
<span class="lineNum">    1955 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1956 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1957 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">    1958 </span>            :     template&lt;typename _Arg, typename _NodeGen&gt;
<span class="lineNum">    1959 </span>            : #else
<span class="lineNum">    1960 </span>            :     template&lt;typename _NodeGen&gt;
<a name="1961"><span class="lineNum">    1961 </span>            : #endif</a>
<span class="lineNum">    1962 </span>            :       typename _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::iterator
<span class="lineNum">    1963 </span><span class="lineCov">        222 :       _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::</span>
<span class="lineNum">    1964 </span>            :       _M_insert_unique_(const_iterator __position,
<span class="lineNum">    1965 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">    1966 </span>            :                         _Arg&amp;&amp; __v,
<span class="lineNum">    1967 </span>            : #else
<span class="lineNum">    1968 </span>            :                         const _Val&amp; __v,
<span class="lineNum">    1969 </span>            : #endif
<span class="lineNum">    1970 </span>            :                         _NodeGen&amp; __node_gen)
<span class="lineNum">    1971 </span>            :     {
<span class="lineNum">    1972 </span>            :       pair&lt;_Base_ptr, _Base_ptr&gt; __res
<span class="lineNum">    1973 </span><span class="lineCov">        222 :         = _M_get_insert_hint_unique_pos(__position, _KeyOfValue()(__v));</span>
<span class="lineNum">    1974 </span>            : 
<span class="lineNum">    1975 </span><span class="lineCov">        222 :       if (__res.second)</span>
<span class="lineNum">    1976 </span>            :         return _M_insert_(__res.first, __res.second,
<span class="lineNum">    1977 </span>            :                           _GLIBCXX_FORWARD(_Arg, __v),
<span class="lineNum">    1978 </span><span class="lineCov">        222 :                           __node_gen);</span>
<span class="lineNum">    1979 </span><span class="lineNoCov">          0 :       return iterator(static_cast&lt;_Link_type&gt;(__res.first));</span>
<span class="lineNum">    1980 </span>            :     }
<span class="lineNum">    1981 </span>            : 
<span class="lineNum">    1982 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    1983 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    1984 </span>            :     pair&lt;typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,
<span class="lineNum">    1985 </span>            :                            _Compare, _Alloc&gt;::_Base_ptr,
<span class="lineNum">    1986 </span>            :          typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,
<span class="lineNum">    1987 </span>            :                            _Compare, _Alloc&gt;::_Base_ptr&gt;
<span class="lineNum">    1988 </span>            :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    1989 </span>            :     _M_get_insert_hint_equal_pos(const_iterator __position, const key_type&amp; __k)
<span class="lineNum">    1990 </span>            :     {
<span class="lineNum">    1991 </span>            :       iterator __pos = __position._M_const_cast();
<span class="lineNum">    1992 </span>            :       typedef pair&lt;_Base_ptr, _Base_ptr&gt; _Res;
<span class="lineNum">    1993 </span>            : 
<span class="lineNum">    1994 </span>            :       // end()
<span class="lineNum">    1995 </span>            :       if (__pos._M_node == _M_end())
<span class="lineNum">    1996 </span>            :         {
<span class="lineNum">    1997 </span>            :           if (size() &gt; 0
<span class="lineNum">    1998 </span>            :               &amp;&amp; !_M_impl._M_key_compare(__k, _S_key(_M_rightmost())))
<span class="lineNum">    1999 </span>            :             return _Res(0, _M_rightmost());
<span class="lineNum">    2000 </span>            :           else
<span class="lineNum">    2001 </span>            :             return _M_get_insert_equal_pos(__k);
<span class="lineNum">    2002 </span>            :         }
<span class="lineNum">    2003 </span>            :       else if (!_M_impl._M_key_compare(_S_key(__pos._M_node), __k))
<span class="lineNum">    2004 </span>            :         {
<span class="lineNum">    2005 </span>            :           // First, try before...
<span class="lineNum">    2006 </span>            :           iterator __before = __pos;
<span class="lineNum">    2007 </span>            :           if (__pos._M_node == _M_leftmost()) // begin()
<span class="lineNum">    2008 </span>            :             return _Res(_M_leftmost(), _M_leftmost());
<span class="lineNum">    2009 </span>            :           else if (!_M_impl._M_key_compare(__k, _S_key((--__before)._M_node)))
<span class="lineNum">    2010 </span>            :             {
<span class="lineNum">    2011 </span>            :               if (_S_right(__before._M_node) == 0)
<span class="lineNum">    2012 </span>            :                 return _Res(0, __before._M_node);
<span class="lineNum">    2013 </span>            :               else
<span class="lineNum">    2014 </span>            :                 return _Res(__pos._M_node, __pos._M_node);
<span class="lineNum">    2015 </span>            :             }
<span class="lineNum">    2016 </span>            :           else
<span class="lineNum">    2017 </span>            :             return _M_get_insert_equal_pos(__k);
<span class="lineNum">    2018 </span>            :         }
<span class="lineNum">    2019 </span>            :       else
<span class="lineNum">    2020 </span>            :         {
<span class="lineNum">    2021 </span>            :           // ... then try after.  
<span class="lineNum">    2022 </span>            :           iterator __after = __pos;
<span class="lineNum">    2023 </span>            :           if (__pos._M_node == _M_rightmost())
<span class="lineNum">    2024 </span>            :             return _Res(0, _M_rightmost());
<span class="lineNum">    2025 </span>            :           else if (!_M_impl._M_key_compare(_S_key((++__after)._M_node), __k))
<span class="lineNum">    2026 </span>            :             {
<span class="lineNum">    2027 </span>            :               if (_S_right(__pos._M_node) == 0)
<span class="lineNum">    2028 </span>            :                 return _Res(0, __pos._M_node);
<span class="lineNum">    2029 </span>            :               else
<span class="lineNum">    2030 </span>            :                 return _Res(__after._M_node, __after._M_node);
<span class="lineNum">    2031 </span>            :             }
<span class="lineNum">    2032 </span>            :           else
<span class="lineNum">    2033 </span>            :             return _Res(0, 0);
<span class="lineNum">    2034 </span>            :         }
<span class="lineNum">    2035 </span>            :     }
<span class="lineNum">    2036 </span>            : 
<span class="lineNum">    2037 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    2038 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    2039 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">    2040 </span>            :     template&lt;typename _Arg, typename _NodeGen&gt;
<span class="lineNum">    2041 </span>            : #else
<span class="lineNum">    2042 </span>            :     template&lt;typename _NodeGen&gt;
<span class="lineNum">    2043 </span>            : #endif
<span class="lineNum">    2044 </span>            :       typename _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::iterator
<span class="lineNum">    2045 </span>            :       _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    2046 </span>            :       _M_insert_equal_(const_iterator __position,
<span class="lineNum">    2047 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">    2048 </span>            :                        _Arg&amp;&amp; __v,
<span class="lineNum">    2049 </span>            : #else
<span class="lineNum">    2050 </span>            :                        const _Val&amp; __v,
<span class="lineNum">    2051 </span>            : #endif
<span class="lineNum">    2052 </span>            :                        _NodeGen&amp; __node_gen)
<span class="lineNum">    2053 </span>            :       {
<span class="lineNum">    2054 </span>            :         pair&lt;_Base_ptr, _Base_ptr&gt; __res
<span class="lineNum">    2055 </span>            :           = _M_get_insert_hint_equal_pos(__position, _KeyOfValue()(__v));
<span class="lineNum">    2056 </span>            : 
<span class="lineNum">    2057 </span>            :         if (__res.second)
<span class="lineNum">    2058 </span>            :           return _M_insert_(__res.first, __res.second,
<span class="lineNum">    2059 </span>            :                             _GLIBCXX_FORWARD(_Arg, __v),
<span class="lineNum">    2060 </span>            :                             __node_gen);
<span class="lineNum">    2061 </span>            : 
<span class="lineNum">    2062 </span>            :         return _M_insert_equal_lower(_GLIBCXX_FORWARD(_Arg, __v));
<span class="lineNum">    2063 </span>            :       }
<span class="lineNum">    2064 </span>            : 
<span class="lineNum">    2065 </span>            : #if __cplusplus &gt;= 201103L
<span class="lineNum">    2066 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    2067 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    2068 </span>            :     typename _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::iterator
<span class="lineNum">    2069 </span>            :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    2070 </span>            :     _M_insert_node(_Base_ptr __x, _Base_ptr __p, _Link_type __z)
<span class="lineNum">    2071 </span>            :     {
<span class="lineNum">    2072 </span>            :       bool __insert_left = (__x != 0 || __p == _M_end()
<span class="lineNum">    2073 </span>            :                             || _M_impl._M_key_compare(_S_key(__z),
<span class="lineNum">    2074 </span>            :                                                       _S_key(__p)));
<span class="lineNum">    2075 </span>            : 
<span class="lineNum">    2076 </span>            :       _Rb_tree_insert_and_rebalance(__insert_left, __z, __p,
<span class="lineNum">    2077 </span>            :                                     this-&gt;_M_impl._M_header);
<span class="lineNum">    2078 </span>            :       ++_M_impl._M_node_count;
<span class="lineNum">    2079 </span>            :       return iterator(__z);
<span class="lineNum">    2080 </span>            :     }
<span class="lineNum">    2081 </span>            : 
<span class="lineNum">    2082 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    2083 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    2084 </span>            :     typename _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::iterator
<span class="lineNum">    2085 </span>            :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    2086 </span>            :     _M_insert_lower_node(_Base_ptr __p, _Link_type __z)
<span class="lineNum">    2087 </span>            :     {
<span class="lineNum">    2088 </span>            :       bool __insert_left = (__p == _M_end()
<span class="lineNum">    2089 </span>            :                             || !_M_impl._M_key_compare(_S_key(__p),
<span class="lineNum">    2090 </span>            :                                                        _S_key(__z)));
<span class="lineNum">    2091 </span>            : 
<span class="lineNum">    2092 </span>            :       _Rb_tree_insert_and_rebalance(__insert_left, __z, __p,
<span class="lineNum">    2093 </span>            :                                     this-&gt;_M_impl._M_header);
<span class="lineNum">    2094 </span>            :       ++_M_impl._M_node_count;
<span class="lineNum">    2095 </span>            :       return iterator(__z);
<span class="lineNum">    2096 </span>            :     }
<span class="lineNum">    2097 </span>            : 
<span class="lineNum">    2098 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    2099 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    2100 </span>            :     typename _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::iterator
<span class="lineNum">    2101 </span>            :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    2102 </span>            :     _M_insert_equal_lower_node(_Link_type __z)
<span class="lineNum">    2103 </span>            :     {
<span class="lineNum">    2104 </span>            :       _Link_type __x = _M_begin();
<span class="lineNum">    2105 </span>            :       _Link_type __y = _M_end();
<span class="lineNum">    2106 </span>            :       while (__x != 0)
<span class="lineNum">    2107 </span>            :         {
<span class="lineNum">    2108 </span>            :           __y = __x;
<span class="lineNum">    2109 </span>            :           __x = !_M_impl._M_key_compare(_S_key(__x), _S_key(__z)) ?
<span class="lineNum">    2110 </span>            :                 _S_left(__x) : _S_right(__x);
<span class="lineNum">    2111 </span>            :         }
<span class="lineNum">    2112 </span>            :       return _M_insert_lower_node(__y, __z);
<span class="lineNum">    2113 </span>            :     }
<span class="lineNum">    2114 </span>            : 
<span class="lineNum">    2115 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    2116 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    2117 </span>            :     template&lt;typename... _Args&gt;
<span class="lineNum">    2118 </span>            :       pair&lt;typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,
<span class="lineNum">    2119 </span>            :                              _Compare, _Alloc&gt;::iterator, bool&gt;
<span class="lineNum">    2120 </span>            :       _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    2121 </span>            :       _M_emplace_unique(_Args&amp;&amp;... __args)
<span class="lineNum">    2122 </span>            :       {
<span class="lineNum">    2123 </span>            :         _Link_type __z = _M_create_node(std::forward&lt;_Args&gt;(__args)...);
<span class="lineNum">    2124 </span>            : 
<span class="lineNum">    2125 </span>            :         __try
<span class="lineNum">    2126 </span>            :           {
<span class="lineNum">    2127 </span>            :             typedef pair&lt;iterator, bool&gt; _Res;
<span class="lineNum">    2128 </span>            :             auto __res = _M_get_insert_unique_pos(_S_key(__z));
<span class="lineNum">    2129 </span>            :             if (__res.second)
<span class="lineNum">    2130 </span>            :               return _Res(_M_insert_node(__res.first, __res.second, __z), true);
<span class="lineNum">    2131 </span>            :         
<span class="lineNum">    2132 </span>            :             _M_drop_node(__z);
<span class="lineNum">    2133 </span>            :             return _Res(iterator(static_cast&lt;_Link_type&gt;(__res.first)), false);
<span class="lineNum">    2134 </span>            :           }
<span class="lineNum">    2135 </span>            :         __catch(...)
<span class="lineNum">    2136 </span>            :           {
<span class="lineNum">    2137 </span>            :             _M_drop_node(__z);
<span class="lineNum">    2138 </span>            :             __throw_exception_again;
<span class="lineNum">    2139 </span>            :           }
<span class="lineNum">    2140 </span>            :       }
<span class="lineNum">    2141 </span>            : 
<span class="lineNum">    2142 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    2143 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    2144 </span>            :     template&lt;typename... _Args&gt;
<span class="lineNum">    2145 </span>            :       typename _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::iterator
<span class="lineNum">    2146 </span>            :       _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    2147 </span>            :       _M_emplace_equal(_Args&amp;&amp;... __args)
<span class="lineNum">    2148 </span>            :       {
<span class="lineNum">    2149 </span>            :         _Link_type __z = _M_create_node(std::forward&lt;_Args&gt;(__args)...);
<span class="lineNum">    2150 </span>            : 
<span class="lineNum">    2151 </span>            :         __try
<span class="lineNum">    2152 </span>            :           {
<span class="lineNum">    2153 </span>            :             auto __res = _M_get_insert_equal_pos(_S_key(__z));
<span class="lineNum">    2154 </span>            :             return _M_insert_node(__res.first, __res.second, __z);
<span class="lineNum">    2155 </span>            :           }
<span class="lineNum">    2156 </span>            :         __catch(...)
<span class="lineNum">    2157 </span>            :           {
<span class="lineNum">    2158 </span>            :             _M_drop_node(__z);
<span class="lineNum">    2159 </span>            :             __throw_exception_again;
<span class="lineNum">    2160 </span>            :           }
<span class="lineNum">    2161 </span>            :       }
<span class="lineNum">    2162 </span>            : 
<span class="lineNum">    2163 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    2164 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    2165 </span>            :     template&lt;typename... _Args&gt;
<span class="lineNum">    2166 </span>            :       typename _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::iterator
<span class="lineNum">    2167 </span>            :       _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    2168 </span>            :       _M_emplace_hint_unique(const_iterator __pos, _Args&amp;&amp;... __args)
<span class="lineNum">    2169 </span>            :       {
<span class="lineNum">    2170 </span>            :         _Link_type __z = _M_create_node(std::forward&lt;_Args&gt;(__args)...);
<span class="lineNum">    2171 </span>            : 
<span class="lineNum">    2172 </span>            :         __try
<span class="lineNum">    2173 </span>            :           {
<span class="lineNum">    2174 </span>            :             auto __res = _M_get_insert_hint_unique_pos(__pos, _S_key(__z));
<span class="lineNum">    2175 </span>            : 
<span class="lineNum">    2176 </span>            :             if (__res.second)
<span class="lineNum">    2177 </span>            :               return _M_insert_node(__res.first, __res.second, __z);
<span class="lineNum">    2178 </span>            : 
<span class="lineNum">    2179 </span>            :             _M_drop_node(__z);
<span class="lineNum">    2180 </span>            :             return iterator(static_cast&lt;_Link_type&gt;(__res.first));
<span class="lineNum">    2181 </span>            :           }
<span class="lineNum">    2182 </span>            :         __catch(...)
<span class="lineNum">    2183 </span>            :           {
<span class="lineNum">    2184 </span>            :             _M_drop_node(__z);
<span class="lineNum">    2185 </span>            :             __throw_exception_again;
<span class="lineNum">    2186 </span>            :           }
<span class="lineNum">    2187 </span>            :       }
<span class="lineNum">    2188 </span>            : 
<span class="lineNum">    2189 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    2190 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    2191 </span>            :     template&lt;typename... _Args&gt;
<span class="lineNum">    2192 </span>            :       typename _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::iterator
<span class="lineNum">    2193 </span>            :       _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    2194 </span>            :       _M_emplace_hint_equal(const_iterator __pos, _Args&amp;&amp;... __args)
<span class="lineNum">    2195 </span>            :       {
<span class="lineNum">    2196 </span>            :         _Link_type __z = _M_create_node(std::forward&lt;_Args&gt;(__args)...);
<span class="lineNum">    2197 </span>            : 
<span class="lineNum">    2198 </span>            :         __try
<span class="lineNum">    2199 </span>            :           {
<span class="lineNum">    2200 </span>            :             auto __res = _M_get_insert_hint_equal_pos(__pos, _S_key(__z));
<span class="lineNum">    2201 </span>            : 
<span class="lineNum">    2202 </span>            :             if (__res.second)
<span class="lineNum">    2203 </span>            :               return _M_insert_node(__res.first, __res.second, __z);
<span class="lineNum">    2204 </span>            : 
<span class="lineNum">    2205 </span>            :             return _M_insert_equal_lower_node(__z);
<span class="lineNum">    2206 </span>            :           }
<span class="lineNum">    2207 </span>            :         __catch(...)
<span class="lineNum">    2208 </span>            :           {
<span class="lineNum">    2209 </span>            :             _M_drop_node(__z);
<span class="lineNum">    2210 </span>            :             __throw_exception_again;
<span class="lineNum">    2211 </span>            :           }
<span class="lineNum">    2212 </span>            :       }
<span class="lineNum">    2213 </span>            : #endif
<span class="lineNum">    2214 </span>            : 
<span class="lineNum">    2215 </span>            :   template&lt;typename _Key, typename _Val, typename _KoV,
<span class="lineNum">    2216 </span>            :            typename _Cmp, typename _Alloc&gt;
<span class="lineNum">    2217 </span>            :     template&lt;class _II&gt;
<span class="lineNum">    2218 </span>            :       void
<span class="lineNum">    2219 </span>            :       _Rb_tree&lt;_Key, _Val, _KoV, _Cmp, _Alloc&gt;::
<span class="lineNum">    2220 </span>            :       _M_insert_unique(_II __first, _II __last)
<span class="lineNum">    2221 </span>            :       {
<span class="lineNum">    2222 </span>            :         _Alloc_node __an(*this);
<span class="lineNum">    2223 </span>            :         for (; __first != __last; ++__first)
<span class="lineNum">    2224 </span>            :           _M_insert_unique_(end(), *__first, __an);
<span class="lineNum">    2225 </span>            :       }
<span class="lineNum">    2226 </span>            : 
<span class="lineNum">    2227 </span>            :   template&lt;typename _Key, typename _Val, typename _KoV,
<span class="lineNum">    2228 </span>            :            typename _Cmp, typename _Alloc&gt;
<span class="lineNum">    2229 </span>            :     template&lt;class _II&gt;
<span class="lineNum">    2230 </span>            :       void
<span class="lineNum">    2231 </span>            :       _Rb_tree&lt;_Key, _Val, _KoV, _Cmp, _Alloc&gt;::
<span class="lineNum">    2232 </span>            :       _M_insert_equal(_II __first, _II __last)
<span class="lineNum">    2233 </span>            :       {
<span class="lineNum">    2234 </span>            :         _Alloc_node __an(*this);
<span class="lineNum">    2235 </span>            :         for (; __first != __last; ++__first)
<span class="lineNum">    2236 </span>            :           _M_insert_equal_(end(), *__first, __an);
<span class="lineNum">    2237 </span>            :       }
<span class="lineNum">    2238 </span>            : 
<span class="lineNum">    2239 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<a name="2240"><span class="lineNum">    2240 </span>            :            typename _Compare, typename _Alloc&gt;</a>
<span class="lineNum">    2241 </span>            :     void
<span class="lineNum">    2242 </span><span class="lineCov">         13 :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::</span>
<span class="lineNum">    2243 </span>            :     _M_erase_aux(const_iterator __position)
<span class="lineNum">    2244 </span>            :     {
<span class="lineNum">    2245 </span>            :       _Link_type __y =
<span class="lineNum">    2246 </span>            :         static_cast&lt;_Link_type&gt;(_Rb_tree_rebalance_for_erase
<span class="lineNum">    2247 </span><span class="lineCov">         13 :                                 (const_cast&lt;_Base_ptr&gt;(__position._M_node),</span>
<span class="lineNum">    2248 </span><span class="lineCov">         13 :                                  this-&gt;_M_impl._M_header));</span>
<span class="lineNum">    2249 </span><span class="lineCov">         13 :       _M_drop_node(__y);</span>
<span class="lineNum">    2250 </span><span class="lineCov">         13 :       --_M_impl._M_node_count;</span>
<span class="lineNum">    2251 </span><span class="lineCov">         13 :     }</span>
<span class="lineNum">    2252 </span>            : 
<span class="lineNum">    2253 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<a name="2254"><span class="lineNum">    2254 </span>            :            typename _Compare, typename _Alloc&gt;</a>
<span class="lineNum">    2255 </span>            :     void
<span class="lineNum">    2256 </span><span class="lineCov">         13 :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::</span>
<span class="lineNum">    2257 </span>            :     _M_erase_aux(const_iterator __first, const_iterator __last)
<span class="lineNum">    2258 </span>            :     {
<span class="lineNum">    2259 </span><span class="lineCov">         20 :       if (__first == begin() &amp;&amp; __last == end())</span>
<span class="lineNum">    2260 </span>            :         clear();
<span class="lineNum">    2261 </span>            :       else
<span class="lineNum">    2262 </span><span class="lineCov">         26 :         while (__first != __last)</span>
<span class="lineNum">    2263 </span>            :           erase(__first++);
<span class="lineNum">    2264 </span><span class="lineCov">         13 :     }</span>
<span class="lineNum">    2265 </span>            : 
<span class="lineNum">    2266 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<a name="2267"><span class="lineNum">    2267 </span>            :            typename _Compare, typename _Alloc&gt;</a>
<span class="lineNum">    2268 </span>            :     typename _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::size_type
<span class="lineNum">    2269 </span><span class="lineCov">         13 :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::</span>
<span class="lineNum">    2270 </span>            :     erase(const _Key&amp; __x)
<span class="lineNum">    2271 </span>            :     {
<span class="lineNum">    2272 </span><span class="lineCov">         13 :       pair&lt;iterator, iterator&gt; __p = equal_range(__x);</span>
<span class="lineNum">    2273 </span>            :       const size_type __old_size = size();
<span class="lineNum">    2274 </span>            :       erase(__p.first, __p.second);
<span class="lineNum">    2275 </span><span class="lineCov">         13 :       return __old_size - size();</span>
<span class="lineNum">    2276 </span>            :     }
<span class="lineNum">    2277 </span>            : 
<span class="lineNum">    2278 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    2279 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    2280 </span>            :     void
<span class="lineNum">    2281 </span>            :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    2282 </span>            :     erase(const _Key* __first, const _Key* __last)
<span class="lineNum">    2283 </span>            :     {
<span class="lineNum">    2284 </span>            :       while (__first != __last)
<span class="lineNum">    2285 </span>            :         erase(*__first++);
<span class="lineNum">    2286 </span>            :     }
<span class="lineNum">    2287 </span>            : 
<span class="lineNum">    2288 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    2289 </span>            :            typename _Compare, typename _Alloc&gt;
<a name="2290"><span class="lineNum">    2290 </span>            :     typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,</a>
<span class="lineNum">    2291 </span>            :                       _Compare, _Alloc&gt;::iterator
<span class="lineNum">    2292 </span><span class="lineCov">         67 :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::</span>
<span class="lineNum">    2293 </span>            :     find(const _Key&amp; __k)
<span class="lineNum">    2294 </span>            :     {
<span class="lineNum">    2295 </span>            :       iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k);
<span class="lineNum">    2296 </span>            :       return (__j == end()
<span class="lineNum">    2297 </span>            :               || _M_impl._M_key_compare(__k,
<span class="lineNum">    2298 </span><span class="lineCov">        125 :                                         _S_key(__j._M_node))) ? end() : __j;</span>
<span class="lineNum">    2299 </span>            :     }
<span class="lineNum">    2300 </span>            : 
<span class="lineNum">    2301 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    2302 </span>            :            typename _Compare, typename _Alloc&gt;
<a name="2303"><span class="lineNum">    2303 </span>            :     typename _Rb_tree&lt;_Key, _Val, _KeyOfValue,</a>
<span class="lineNum">    2304 </span>            :                       _Compare, _Alloc&gt;::const_iterator
<span class="lineNum">    2305 </span><span class="lineCov">        146 :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::</span>
<span class="lineNum">    2306 </span>            :     find(const _Key&amp; __k) const
<span class="lineNum">    2307 </span>            :     {
<span class="lineNum">    2308 </span>            :       const_iterator __j = _M_lower_bound(_M_begin(), _M_end(), __k);
<span class="lineNum">    2309 </span>            :       return (__j == end()
<span class="lineNum">    2310 </span>            :               || _M_impl._M_key_compare(__k, 
<span class="lineNum">    2311 </span><span class="lineCov">        192 :                                         _S_key(__j._M_node))) ? end() : __j;</span>
<span class="lineNum">    2312 </span>            :     }
<span class="lineNum">    2313 </span>            : 
<span class="lineNum">    2314 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    2315 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    2316 </span>            :     typename _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::size_type
<span class="lineNum">    2317 </span>            :     _Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::
<span class="lineNum">    2318 </span>            :     count(const _Key&amp; __k) const
<span class="lineNum">    2319 </span>            :     {
<span class="lineNum">    2320 </span>            :       pair&lt;const_iterator, const_iterator&gt; __p = equal_range(__k);
<span class="lineNum">    2321 </span>            :       const size_type __n = std::distance(__p.first, __p.second);
<span class="lineNum">    2322 </span>            :       return __n;
<span class="lineNum">    2323 </span>            :     }
<span class="lineNum">    2324 </span>            : 
<span class="lineNum">    2325 </span>            :   _GLIBCXX_PURE unsigned int
<span class="lineNum">    2326 </span>            :   _Rb_tree_black_count(const _Rb_tree_node_base* __node,
<span class="lineNum">    2327 </span>            :                        const _Rb_tree_node_base* __root) throw ();
<span class="lineNum">    2328 </span>            : 
<span class="lineNum">    2329 </span>            :   template&lt;typename _Key, typename _Val, typename _KeyOfValue,
<span class="lineNum">    2330 </span>            :            typename _Compare, typename _Alloc&gt;
<span class="lineNum">    2331 </span>            :     bool
<span class="lineNum">    2332 </span>            :     _Rb_tree&lt;_Key,_Val,_KeyOfValue,_Compare,_Alloc&gt;::__rb_verify() const
<span class="lineNum">    2333 </span>            :     {
<span class="lineNum">    2334 </span>            :       if (_M_impl._M_node_count == 0 || begin() == end())
<span class="lineNum">    2335 </span>            :         return _M_impl._M_node_count == 0 &amp;&amp; begin() == end()
<span class="lineNum">    2336 </span>            :                &amp;&amp; this-&gt;_M_impl._M_header._M_left == _M_end()
<span class="lineNum">    2337 </span>            :                &amp;&amp; this-&gt;_M_impl._M_header._M_right == _M_end();
<span class="lineNum">    2338 </span>            : 
<span class="lineNum">    2339 </span>            :       unsigned int __len = _Rb_tree_black_count(_M_leftmost(), _M_root());
<span class="lineNum">    2340 </span>            :       for (const_iterator __it = begin(); __it != end(); ++__it)
<span class="lineNum">    2341 </span>            :         {
<span class="lineNum">    2342 </span>            :           _Const_Link_type __x = static_cast&lt;_Const_Link_type&gt;(__it._M_node);
<span class="lineNum">    2343 </span>            :           _Const_Link_type __L = _S_left(__x);
<span class="lineNum">    2344 </span>            :           _Const_Link_type __R = _S_right(__x);
<span class="lineNum">    2345 </span>            : 
<span class="lineNum">    2346 </span>            :           if (__x-&gt;_M_color == _S_red)
<span class="lineNum">    2347 </span>            :             if ((__L &amp;&amp; __L-&gt;_M_color == _S_red)
<span class="lineNum">    2348 </span>            :                 || (__R &amp;&amp; __R-&gt;_M_color == _S_red))
<span class="lineNum">    2349 </span>            :               return false;
<span class="lineNum">    2350 </span>            : 
<span class="lineNum">    2351 </span>            :           if (__L &amp;&amp; _M_impl._M_key_compare(_S_key(__x), _S_key(__L)))
<span class="lineNum">    2352 </span>            :             return false;
<span class="lineNum">    2353 </span>            :           if (__R &amp;&amp; _M_impl._M_key_compare(_S_key(__R), _S_key(__x)))
<span class="lineNum">    2354 </span>            :             return false;
<span class="lineNum">    2355 </span>            : 
<span class="lineNum">    2356 </span>            :           if (!__L &amp;&amp; !__R &amp;&amp; _Rb_tree_black_count(__x, _M_root()) != __len)
<span class="lineNum">    2357 </span>            :             return false;
<span class="lineNum">    2358 </span>            :         }
<span class="lineNum">    2359 </span>            : 
<span class="lineNum">    2360 </span>            :       if (_M_leftmost() != _Rb_tree_node_base::_S_minimum(_M_root()))
<span class="lineNum">    2361 </span>            :         return false;
<span class="lineNum">    2362 </span>            :       if (_M_rightmost() != _Rb_tree_node_base::_S_maximum(_M_root()))
<span class="lineNum">    2363 </span>            :         return false;
<span class="lineNum">    2364 </span>            :       return true;
<span class="lineNum">    2365 </span>            :     }
<span class="lineNum">    2366 </span>            : 
<span class="lineNum">    2367 </span>            : _GLIBCXX_END_NAMESPACE_VERSION
<span class="lineNum">    2368 </span>            : } // namespace
<span class="lineNum">    2369 </span>            : 
<span class="lineNum">    2370 </span>            : #endif
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="ruler"><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>
    <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.12</a></td></tr>
  </table>
  <br>

</body>
</html>
